I am trying to run the Unix command from Load Runner using popen. I tried step by step approach below are they
Step 1 : I first tried logging into the Jump Server
fp = popen("plink.exe -ssh -l username -pw password Servername", "r");
Output using above command in Load runner : Last login: Thu Jan 11 11:11:11 2018 from some.machine.net
Output manually using Putty : Using username "abcdef". Last login: Thu Jan 11 11:11:11 2018 from some.machine.net abcdef@mymachine:~>
I successfully able to capture the desired result
Step 2 : I want to execute ls command once I am logged into the Jump Server, so I appended the ls command to the above command in the popen
fp = popen("plink.exe -ssh -l username -pw password Servername ls", "r");
then no output is produced and I get an error
In step 1 I am able to capture the output which is "Last login: Thu Jan 11 11:11:11 2018 from some.machine.net" But in step 2 when I am trying to execute the ls command just by appending in the same popen statement I am getting error.
My objective is to read the output of the ls command