Edit SSh config: ~/.ssh/config

Host firsthost
    SSH_OPTION_1 custom_value
    SSH_OPTION_2 custom_value
    SSH_OPTION_3 custom_value
Host secondhost
    ANOTHER_OPTION custom_value
Host *host
    ANOTHER_OPTION custom_value
Host *
    CHANGE_DEFAULT custom_value



We define options using a key-value system. Each pair should be on a separate line. Keys can be separated from their associated values either by white space, or by an equal sign with optional white space.

Identity FileEdit

Host something
    IdentityFile ~/.ssh/id_rsa_common


Host Something
    User kona
    StrictHostKeyChecking no

SSH proxiesEdit

If you have an SSH server that’s only accessible to you via an SSH session on an intermediate machine, which is a very common situation when dealing with remote networks using private RFC1918 addresses through network address translation, you can automate that in .ssh/config too. Say you can’t reach the host nathost directly, but you can reach some other SSH server on the same private subnet that is publically accessible,

Host nathost

ProxyCommand ssh -q -W %h:%p

This will allow you to just type:

$ ssh nathost