in reply to Multilevel SSH
You can use Net::OpenSSH and Net::OpenSSH::Gateway. The later is not on CPAN yet because I am not completely happy with its internals, but otherwise it is completely functional.
Once installed, you can run:
Under the hood it uses several tricks to find a way to jump from one hop to the next, as creating tunnels or running any of socat, netcat or perl.my $ssh = Net::OpenSSH->new($target, gateway => { proxies => ['ssh://serverA', 'ssh://serverB'] +}); my $output = $ssh->capture('ls');
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Multilevel SSH
by grantm (Parson) on Oct 18, 2012 at 02:14 UTC | |
by salva (Canon) on Oct 18, 2012 at 07:42 UTC |
In Section
Seekers of Perl Wisdom