Notes

Add Host configurations to ssh config

Add Host configurations and aliases (shortcuts) for easy ssh connections

Edit on GitHub

System Administration
1# ~/.ssh/config
2
3# server on Amazon LightSail
4Host lightsail
5  HostName tornado.mycooldomain.com
6  User kunami
7  IdentityFile ~/.ssh/id_rsa
8  Port 4234
  • Host is followed by whatever alias you want to give the host definition
  • HostName could be an FQDN or a numeric IP address
  • IdentityFile is the SSH key used for connecting to the server. I always use a key..
  • User and Port are self explanatory. Port is good to specify here if you use custom ports (which you should).

You can also do other cool stuff like tunneling and port forwarding

Now you can do this:

1ssh lightsail

instead of this:

1ssh -i ~/.ssh/id_rsa -p 4234 kunami@tornado.mycooldomain.com