Save host config for ssh on mac

The most simple way to save host configurations for easy ssh’ing from Terminal on mac:
Add host entries to ~/.ssh/config file

This file doesn’t exist by default so you can easily create the file and add your host shortcuts.

For example, if you’d like to be able to type

user$> ssh MyHost

instead of ssh mycomplicatedhostname.host.com

Create the config file and add the following line:

Host MyHost
Hostname mycomplicatedhostname.host.com
Port 22
User myUser

Leave a comment