Information about SSH.

SSH can be a little tricky. Below I have the various things I have come across to help me out. Most commands currently are for Mac, once I mess with Windows more I will update.


SSH version installed on your system

$ ssh -V

Create an SSH Key

Run the following command and pick all the defaults to the prompts. This tutorial doesn't explain how to use passphrases.

$ ssh-keygen

Be mindful the command above is a super basic way. GitLab mentioned the following options at the end of the ssh-keygen command. See the picture below or visit the GitLab Docs

Add SSH Key To GitHub or GitLab

Test SSH Connection

The following commands should say Hello or Welcome followed by your username if you set everything up correctly. Learn more at the GitLab Docs or GitHub Docs.

$ ssh -T
$ ssh -T

Are you still getting Permission Denied?

Make sure you are in your root when running this command. Also, be mindful you will replace SSH_FILENAME with your filename.

$ ssh-add ~/.ssh/SSH_FILENAME

Last updated