note salva You can use [mod://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. <p>Once installed, you can run: <c> my $ssh = Net::OpenSSH->new($target, gateway => { proxies => ['ssh://serverA', 'ssh://serverB'] }); my $output = $ssh->capture('ls'); </c> 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 <c>socat</c>, <c>netcat</c> or <c>perl</c>. 999287 999287