Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to standardize my server aliases across projects by linking together ssh config files that I can keep under version control.

I'd like to be able to just define machine aliases along with IP addresses and ssh keys all in one place (the ssh configs). This works nicely with ssh based utils like /bin/ssh and (I believe) scp. You even get tab completion.

However, if I set the aliases in my ssh config then the aliases aren't available to ping and other vanilla network utils. I don't want to have to keep my /etc/hosts synchronized with my ssh config files.

Is there a way to either

a) get ssh aliases to automatically work as if they were in /etc/hosts. or b) find a suite of network utils that uses the active ssh config as a source of aliases.


share|improve this question
ssh_config is only referenced by ssh utilities. Why not use /etc/hosts to standardise - what are you storing in ssh_config beyond the hostname? –  Paul May 27 '12 at 22:12
You can modify your shell completion setup to use ssh config but if these names does not resolve then you are still out of luck. I suggest sync /etc/hosts file too if you can't set up your own DNS server for that. –  Cougar May 28 '12 at 7:32

Your Answer


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

Browse other questions tagged or ask your own question.