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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s