in reply to Re^2: Using Net::SSH2 with Net::Telnet::Cisco
in thread Using Net::SSH2 with Net::Telnet::Cisco
That works for me:
#!/usr/bin/perl use strict; use warnings; use Net::OpenSSH; use Net::Telnet; $Net::OpenSSH::debug = -1; my $ssh = Net::OpenSSH->new('localhost'); my ($fh, $pid) = $ssh->open2pty(); my $conn = Net::Telnet->new(Fhopen => $fh); my @lines = $conn->cmd("find /tmp"); print @lines; my @lines1 = $conn->cmd("ls"); print "\n\nls:\n", @lines1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using Net::SSH2 with Net::Telnet::Cisco
by gnork (Scribe) on Aug 07, 2012 at 11:02 UTC |