Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: perl-expect interact command

by salva (Monsignor)
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.


Comment on Re: perl-expect interact command
Download Code
Re^2: perl-expect interact command
by Frits (Initiate) 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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-09-01 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls