C
cyrusgreats
Hi ,
I'm trying to interactively sending the username/password to login and
then send CLI commands usinf ssh, this is the only way I can access
the device, and then sending the commands when logged in, I used the
following but it seems does not pass the password, I'm sure one of you
guyus out there have an idea. Thanks in advance..
#!/usr/bin/perl
use IPC::Session;
# open ssh session to your applinace
# -- set timeout of 30 seconds for all send() calls
my $mybox = "10.0.42.111";
my $session = new IPC::Session("ssh -l usrname $mybox",30);
# use like 'expect':
print $session->send("passwd");
Here I see the Password prompt but I can't pass password ..
cheers
I'm trying to interactively sending the username/password to login and
then send CLI commands usinf ssh, this is the only way I can access
the device, and then sending the commands when logged in, I used the
following but it seems does not pass the password, I'm sure one of you
guyus out there have an idea. Thanks in advance..
#!/usr/bin/perl
use IPC::Session;
# open ssh session to your applinace
# -- set timeout of 30 seconds for all send() calls
my $mybox = "10.0.42.111";
my $session = new IPC::Session("ssh -l usrname $mybox",30);
# use like 'expect':
print $session->send("passwd");
Here I see the Password prompt but I can't pass password ..
cheers