If I ssh into a remote machine (remote1, say), is it possible to alias the network that machine is on so that I could easily refer to a different remote machine, ie ssh remote2.remote_network rather than having to ssh onto remote1 and then ssh onto remote2 from there (Just so you know, I can only ssh into the remote network through remote1).

I think dynamic forwarding might be a solution, but I can't work out if I'm doing it wrong or just barking up the wrong tree.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

Yes, you want the ProxyCommand config option. There's a perfect example of how to use it in your situation in the ssh_config(5) man page.

link|improve this answer
Coupled with Host *.remotes in my .ssh/config this works brilliantly. Thanks! – dbeacham Jul 27 '11 at 18:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.