in reply to Net::OpenSSH to ups appliance
Net::OpenSSH will not handle authenticating against such systems. Though, if all you want is getting the motd, the following code may work:
my $ssh = Net::OpenSSH->new($host, user => $user, timeout => 30); my $motd = $ssh->capture({stdin_data => "$password\n\n4\n", stderr_to_stdout => 1}); print $motd;
Alternatively, just use Expect.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::OpenSSH to ups appliance
by natxo (Scribe) on Aug 29, 2013 at 13:45 UTC |