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

Create the config file and add the following line:

Host MyHost
Port 22
User myUser

Leave a Reply

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

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

Facebook photo

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

Connecting to %s