Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979420]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2018-03-21 09:13 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (265 votes). Check out past polls.