Linux quicktip: Ssh names

Linux quicktip: Ssh names

Got a lot of machines to connect to? It gets really annoying to memorize the ip's. Use this tip to give names to the connections and easily connect to the names instead of the ip's.

In your users home folder create or go to the /.ssh folder and create a file named config. In this file add the following lines for each connection you have.

Host my-local-address
    HostName 127.0.0.1
    User username

Cool! After you save the file you can, with this specific example, connect to the ip 127.0.0.1 by using the command `ssh my-local-address`.

As you can maybe imagine the are plenty more options to be entered here. But this being a quicktip, I am not going to explore these with you. If you want to know more, check out this article which shows a lot more: https://linuxize.com/post/using-the-ssh-config-file/#ssh-config-file-location