How to make ssh connections on mac easier

Medium 6697908289
photo credit: jurvetson via photopin cc

Hello, this is Bono.

When you are running several blogs and web services, you can't remember every IP address and ssh connection tends to be a hassle.

In such cases, the following method will make the connection much easier.

Prepare config file

Create a file named "config" in the following location.

vim ~/.ssh/config

Then, in the config file, describe the server information you want to set up the connection.
A number of settings are possible.

Host hoge1
    HostName XX.XX.XXX.XXX
    Port AA
    User ZZZ
    IdentityFile ~/.ssh/YYYY

Host hoge2
    HostName XX.XXX.XX.XX
    Port AAA
    User ZZZZ
    IdentityFile ~/.ssh/YY

Host hoge3
    HostName XX.XXX.XXX.XX
    Port AAA
    User ZZ
    IdentityFile ~/.ssh/YYY