If netcat (or socat or some similar utility) is available in machine C, then it can be done as follows:
my $ssh = Net::OpenSSH->new($host, master_opts => [-o "ProxyCommand ssh machi +neC /usr/bin/nc %h:%p"]);
Otherwise, if perl (or any other scripting language) is available on machine C, you could write a netcat clone yourself with it.
As a last resort, you can use this (not very efficient) ProxyCommand:
If you want to use password authentication between machine A and machine C, you will have to do it using an auxiliary Net::OpenSSH object.ProxyCommand ssh machineC ssh -p %p %h sshd -i
Post the full details of your setup and I will be able to provide further instructions on how to do it.
update: oh, and of course, you can use ssh to create a tunnel from machine A to B through C if they are not administratively forbidden in machine C... in my experience, something very unlikely.
In reply to Re: Net::OpenSSH and tunnels
by salva
in thread Net::OpenSSH and tunnels
by vxp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |