in reply to Re^2: Retrieving status data from a device with SSH 2 using Perl
in thread Retrieving status data from a device with SSH 2 using Perl
Because I guess that if I use Expect with the Net::OpenSSH commands, I have to work with the same incomplete answer as if I were using the commands directly.
You can use Net::OpenSSH to establish the connection to the remote machine and then run an interactive shell managed with Expect as follows:
Though, if that is all you need to do in the remote server, using Expect alone will be almost the same, the only difference is that you will have to take care of authentication also.my ($pty, $pid) = $ssh->open2pty() # and empty command line invokes a +shell! or die "unable to run remote shell"; my $expect = Expect->init($pty); $expect-> ...
PS: Salva? Betanzos? Super López? I guess I'm not the only Spaniard here!
No, you are not, where are you from?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Retrieving status data from a device with SSH 2 using Perl
by nmorenod (Novice) on Feb 17, 2010 at 16:16 UTC | |
by salva (Canon) on Feb 17, 2010 at 17:10 UTC | |
by nmorenod (Novice) on Feb 18, 2010 at 10:03 UTC |