So this is like a motd when you login. How can I capture this info? I have tried this:slogin user@ups Authenticated with partial success. user@ups's password: American Power Conversion Network Management Card AOS + v3.7.3 (c) Copyright 2009 All Rights Reserved Smart-UPS & Matrix-UPS APP + v3.7.2 ---------------------------------------------------------------------- +--------- Name : asset Date : 29.08.201 +3 Contact : sysadmin Time : 12:27:03 Location : somewhere User : Administr +ator Up Time : 0 Days 4 Hours 9 Minutes Stat : P+ N+ A+ Smart-UPS 1500 RM named asset : On Line, No Alarms Present ------- Control Console ---------------------------------------------- +--------- 1- Device Manager 2- Network 3- System 4- Logout <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
But I am afraid I am getting nothing. I know I can log in, I see that on the log file, but am a bit confused about getting the info. Any help appreciated.use strict; use warnings; use Net::OpenSSH; my $host = shift; my $stdin; my $stdout; my $stderr; print $host, "\n"; my $ssh = Net::OpenSSH->new( $host, user => "user", password => "password", timeout => 30, default_stdin_fh => $stdin, default_stdout_fh => $stdout, default_stderr_fh => $stderr, ); $ssh->error and die "Can't ssh to $host: " . $ssh->error; print "stdin is $stdin\n" if defined $stdin ; print "stdout is $stdout\n" if defined $stdout; print "stderr is $stderr\n" if defined $stderr ;
In reply to Net::OpenSSH to ups appliance by natxo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |