shooter has asked for the wisdom of the Perl Monks concerning the following question:
First time user hopefully long time Monk. I have a question regarding Net::SSH::Perl which I hope can be easily answered.
Using Net::SSH::Perl I can get STDOUT to my screen in all cases except for commands run in real time.
For example tail -f or snoop.
I have no problems with such commands with defined answers such as who,cat,date,uptime etc.
This issue has a work around in SSH::Telnet using the code below.
$telnet = new Net::Telnet (input_log => \*STDOUT , Timeout =>1000); $telnet ->open("$host"); $telnet->login("$user","$password"); $telnet->cmd("snoop -d bge0");
My question is, is there a workaround in Net::SSH::Perl
My Net::SSH code is
my $ssh=Net::SSH::Perl->new("$host"); $ssh->login("$user","$password"); ($stdout,$stderr)=$ssh->cmd("snoop -d bge0"); print $stdout;
but for the life of me I can't get this to work on Net::SSH::Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH::Perl Realtime output
by anthski (Scribe) on Sep 02, 2005 at 02:59 UTC | |
by shooter (Novice) on Sep 02, 2005 at 09:32 UTC | |
|
Re: Net::SSH::Perl Realtime output
by idsfa (Vicar) on Sep 01, 2005 at 19:19 UTC | |
by Anonymous Monk on Sep 01, 2005 at 20:37 UTC | |
|
Re: Net::SSH::Perl Realtime output
by sh1tn (Priest) on Sep 01, 2005 at 16:16 UTC |