You are here

SSH aliases using a config file

Submitted by Druss on Sat, 2012-11-24 22:19

In Linux, you can simplify some of your SSH commands using an SSH config file. For example, create a file named config in your ~/.ssh directory with something like the following:

Host bar
    HostName bar.examplecom
    User bar user

Host foo
    User foouser

This will allow you to ssh into the specified hosts using short commands such as ssh foo and ssh bar.

More complex options are listed on the man page.