Saving SSH session in Terminal

For Windows users, use PuTTY.

For Mac users, locate to .ssh folder which is under the root folder and create a file named “config” – you can simply use TextEdit.

Note: since .ssh folder is hidden, you can type the below command to view hidden files.

defaults write AppleShowAllFiles TRUE
killall Finder

In your “config’ file, write and save the server information. Below is just an example. Make sure you follow the below format.

Host abc
    Port 22
    User abc

If you are done modifying your config file, hide your folders by running the below command.

defaults write AppleShowAllFiles FALSE
killall Finder

To connect to the server, relaunch your Terminal and write the below command.

ssh abc

I wanted to create shortcuts to easily connect to servers but if you don’t need to have shortcuts, you can simply open your terminal and click “New Remote Connection” which is located under the “Shell” menu. Click the plus sign and add your server information.


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