in reply to Net::SSH2 Question - again-
You can use ssh's port forwarding to do this:
use strict; use Net::SSH2; my $ssh1 = Net::SSH2->new(); $ssh1->connect($host1) or die "connect to SSH1 failed"; $ssh1->auth_password('user', 'pass') or die "auth1 failed"; $ssh1->tcpip($host2, 22, '127.0.0.1', 9922); my $ssh2 = Net::SSH2->new(); $ssh2->connect('127.0.0.1', 9922) or die "connect to SSH2 failed"; $ssh2->auth_password('user2', 'pass2') or die "auth2 failed"; # ... as many hops as you need ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SSH2 Question - again-
by bgi (Sexton) on May 29, 2008 at 15:47 UTC | |
by bgi (Sexton) on May 30, 2008 at 12:02 UTC |