james_culling has asked for the wisdom of the Perl Monks concerning the following question:
#! / Usr / bin / perl use strict; use Net::SSH::Expect; my $ssh = Net::SSH::Expect->new ( host => "xx.xx.xx", password=> 'passwd', user => 'usr', raw_pty => 1, timeout => 10 ); my $login_output = $ssh->login(); if ($login_output !~ /#/) { die "Login has failed. Login output was $login_output"; } print $login_output; my $who = $ssh->exec("show version"); print ($who); $ssh->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't locate object method "autoflush"
by wazat (Monk) on Dec 09, 2013 at 18:48 UTC | |
|
Re: Can't locate object method "autoflush"
by ikegami (Patriarch) on Dec 09, 2013 at 19:04 UTC | |
|
Re: Can't locate object method "autoflush"
by taint (Chaplain) on Dec 09, 2013 at 16:30 UTC | |
|
Re: Can't locate object method "autoflush"
by james_culling (Novice) on Dec 10, 2013 at 06:23 UTC |