I have an entry in ~/.ssh/config on my computer at home that look like this:
host foo bar
ProxyCommand ssh -x -a -q gateway.example.com nc %h 22
gateway.example.com is a server at work that is connected to both the public Internet and an internal network. The gateway box resolves foo and bar using entries in /etc/hosts.
My problem is that I need to reach a box that is on the other side of
foo. Let's call it "baz". The "baz" host is on another private network that foo is connected to, but not the one that "gateway" is connected to.
I've tried using this:
ProxyCommand ssh -x -a -q gateway/example.com ssh foo nc %h 22
But that doesn't work, and I'm a little out of my depth. How do I do this?
I don't think it should matter, but I'm doing this in Ubuntu 10.