- or download this
use Net::SSH::Perl;
...
my($out,$err,$ext) = $ssh->cmd("echo LOGINSUCCESSFUL");
print "out=$out err=$err ext=$ext\n";
- or download this
% ./test.pl linux-host root password
Use of uninitialized value in concatenation (.) or string at ./test.pl
+ line 16.
out=LOGINSUCCESSFUL
err= ext=0
- or download this
% ./test.pl windows-host Administrator password
Use of uninitialized value in concatenation (.) or string at ./test.pl
+ line 16.
Use of uninitialized value in concatenation (.) or string at ./test.pl
+ line 16.
out= err= ext=255
- or download this
% ssh -2 root@linux-host "echo LOGINSUCCESFUL"
root@linux-host's password:
...
% ssh -2 Administrator@windows-host "echo LOGINSUCCESFUL"
Administrator@windows-host's password:
LOGINSUCCESFUL