Web and App Development Tutorials

Ubuntu - Create a SSH Config File to Handle Multiple SSH Logins

Step 01 Go into Your SSH Directory

Go into Your SSH Directory

Go into the ssh directory by running the the cd command also called the change directory command.

Step 02 Generate an Empty File Called config

Generate an Empty File Called config

The Linux touch command can be used to update a file's time stamps, but in this case we're generating an empty config file to paste the information on the 4th step.

Step 03 Open the config File With a Text Editor

Open the config File With a Text Editor

Ever tried a command line text editor. For this tutorial give it a try! Let's "nano" into your config file and get editing.

Step 04 Paste the Below Code into the config File

Paste the Below Code into the config File

Paste the below configuration code into your file, if you followed our "Setup a SSH Key for Your GitHub Account" tutorial you're %100 good to go. If not just modify the IdentityFile section and point it to the proper RSA file.

Step 05 Exit Out of Nano

Exit Out of Nano

Press the combination Ctrl + x to exit it will confirm to overwrite the file on the way out just hit enter and it's saved.

Step 06 chmod Your File for Proper Permissions

chmod Your File for Proper Permissions

chmod your file and assign the config file proper access permissions to keep it secure but readable. And you're all set. Repeat this process to add new accounts.