How to use ssh config

By default SSH use native config file ~/.ssh/config without extension.

How to use it:

Host {alias}
    HostName {host name or ip address}
    User {username}
#   Port {port} - optional
#   IdentityFile {path/to/ssh-private-key} - optional
#   Compression {yes or no} - optional
#   ConnectTimeout {time in seconds} - optional

For example your ~/.ssh/config file:

Host host1
    HostName api.host.com
    User root

You could to connect to your host with command:

ssh host1
About me
Denis Vdovin
Programmer, data analyst, living in Cyprus