frankd
11/22/2017 - 9:25 AM

SSH Keys Generation and

SSH Keys Generation

Checking for existing SSH keys first

ls -al ~/.ssh

Generating a new SSH key

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Adding your SSH key to the ssh-agent

eval "$(ssh-agent -s)"

Add your SSH private key to the ssh-agent and store your passphrase in the keychain

ssh-add -K ~/.ssh/id_rsa

Adding a new SSH key to your GitHub account

pbcopy < ~/.ssh/id_rsa.pub

If it doesn’t work (do not copy it) use:

cat git_rsa.pub 

This will list the key, then just copy it and paste into the deploy key on the GitHub repo

Modify existing SSH

CD into .ssh

cd ~/.ssh
ls -la
vim known_hosts

Then change the credentials if necessary and save it