http://qs321.pair.com?node_id=688878


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 ...

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon