Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl-expect interact command

by salva (Abbot)
on Jul 02, 2012 at 12:00 UTC ( #979420=note: print w/replies, xml ) Need Help??


in reply to perl-expect interact command

use Net::OpenSSH; my $ssh_proxy = Net::OpenSSH->new("$username\@domain-name"); my $proxy_command = $ssh_proxy->make_remote_command({tunnel => 1}, $de +vice, 22); my $ssh = Net::OpenSSH->new("admin\@$device", password => $password, p +roxy_command => $proxy_command); $ssh->system;
untested, requires a relatively recent version of OpenSSH installed locally and tunnels enabled on the gateway host.

Replies are listed 'Best First'.
Re^2: perl-expect interact command
by Frits (Novice) on Oct 09, 2012 at 08:11 UTC
    Hi All, I have tried all options in different senarios and I the script is not taking it. The part of Net::OpenSSH is nice, but the problem part for me here is that I do not own the server and OpenSSH is not an option for me. (just user) I was wondering if there is an option within $exp->interact(); Like when within the interact process if the hostname of the device is detected it will send and additional exit.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979420]
help
Chatterbox?
marioroy just logged in to say that MCE::Hobo has passed testing and therefore will continue to run like threads but have managed capabilities similar to Parallel:: ForkManager. It allows multiple managed instances to run simultaneously. Zero limitations.
marioroy it's taken a long time to make this possible.
marioroy will post demonstrations after release

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-07-28 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (434 votes). Check out past polls.