For Debian 9 (and MacOS)
- Check for old keys
-
cd ~/.ssh
-
ls id_*
-
- Backup old keys
-
mkdir keys_backup
-
cp id_* keys_backup
-
- Generate a new key
-
ssh-keygen -t rsa -C "your_email@example.com"
- don’t use a passphrase
-
- Go to the key directory
-
cd ~/.ssh
-
- Download the public key
- Open the key in Notepad++ (or similar)
- Log in at github.com
- Click on the right side on your profile picture
- Click on Settings
- Click on SSH and GPG Keys
- Click on New SSH Key
- Create a new name for the key
- Paste the contents of the public key into the Key field
- Click on Add SSH Key
Done.