Hi experts, Currently I have written a test program as follows. <snip> use strict; use warnings;
#use IPC::open2; use Net::SSH::Perl; #my $host = 'samudra.india.hp.com'; my $host = '15.76.97.101'; my $cmd="cd Test"; My $cmd1="ls -al"; my $ssh = new Net::SSH::Perl($host, port => 22, debug => 1, protocol => 2); #close(0); #close(1); #close(2); $ssh->login("Rishi", "passwd"); my ($out, $err, $exit) = $ssh->cmd($cmd); my ($out, $err, $exit) = $ssh->cmd($cmd1); print "\n $out"; # Print the list of files #$ssh->_disconnect(); print "\n Hi Rishi, you are disconnected"; #$ssh->cmd("exit"); </snip> In the output, I am not getting the list of files of /home/jagadisa/Test, Rather I am seeing the list of files in /home/jagadisa. My intention is to Get the list of file in /home/jagadisa/Test For my project work, I need to send these commands in two different Ssh commands as a different requirement. I can't send them in one Command as "cd Test; ls-al". Can you please let me know how can I send Two dependent commands in two different statements and get the desired output. I am stuck with my project due to this. I will appreciate your help in this regard. Regards, Rishi _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs