Marcelo
2/19/2008 2:05:00 PM
On Feb 19, 2008 7:15 AM, Valerio Schiavoni <valerio.schiavoni@gmail.com> wrote:
> what I want to do is the following:
> - ssh into a remote machine (let's call it 'frontend')
> - from the front-end, ssh into another machine (call it node-A)
I'm not sure if Net::SSH supports this, but basically what you want is
this:
$ ssh -f -L 1234:remote_host:22 proxy_host < /dev/null &> /dev/null &
$ ssh -p 1234 localhost
where "1234" is a number you pick. It will be the port on the client
machine that you can use to initiate a SSH connection to the remote
machine (remote_host). Note that "remote_host" will be resolved by
"proxy_host", not by the client.
I'd suggest you try it first on the command line and once you get it
working wrap it with Ruby.
HTH,
Marcelo