Sysadmins of the North
Don't forget to share this post!

Ssh shorthand name for hostnames

Ssh shorthand name for hostnames. How to use shorthand names for hostnames with ssh? You don’t always want to typ in complete hostnames when using ssh to remote hosts. Here is how to configure and use shorthand hostnames with ssh.

Open up your .ssh/config file:

vi ~/.ssh/config

and add the following:

Host your_short_name
HostName server.on.the.web
User user_to_user

Save the file and exit (:wq). Now you can use ‘ssh your_short_name‘ instead of: ssh -l username Pretty neat, huh?! 🙂

About the Author Jan Reilink

My name is Jan. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing my daily thing at Vevida in the Netherlands. With over 15 years of experience, my specialties include Windows Server, IIS, Linux (CentOS, Debian), security, PHP, WordPress, websites & optimization. Want to support me and donate? Use this link:

follow me on:

Leave a Comment:

Skip to content P vEF