I have been playing with perl on and off for the last year or so, but I am in no way a programmer, so bare with me if I explain my problems wrong.
I am using expect to login and run some commands on remote servers. The problem I am having is there is a large SSH banner which seems to confuse expect. It says: SSHAuthenticationError Login timed out. The input stream currently has the contents bellow: ****************************************************************************** Then the banner here.
Second problem I am having is, I have using the following code to read the output from commands and print it to the screen. But it never seems to read the last line of output. I am wondering if its because the last line is delayed? Is there a function to make the read line statement wait for a prompt back?
Thanks in advance.my $line; while ( defined ($line = $ssh->read_line()) ) +{ print $line . "\n";
In reply to Net::SSH::Expect - Reading stream and banner troubles. by vonedaddy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |