Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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