Listed here are the commands to generate and register ssh key on your computer.
ssh-keygen -t rsa -b 4096 -C <your email address here>
You can specify the path where you want to save the ssh key by typing the path when it is asked. Not typing anything will generate the key inside .ssh
folder in the home directory.
After saving the key, you will be ask to enter a paraphrase
, you will use this paraphrase later to access the key. You can click enter for empty parahrase but it is not recommended.
eval $(ssh-agent -s)
The ssh-agent is a helper program that keeps track of user's identity keys and their passphrases. The agent can then use the keys to log into other servers without having the user type in a password or passphrase again. This implements a form of single sign-on.
ssh-add ~/.ssh/id_rsa
~/.ssh/id_rsa
is the path where the ssh key is saved. If you specify a path earlier, you need to add that ssh key.
cat ~/.ssh/id_rsa.pub
This will output your generated SSH key earlier. You can copy this key and paste in on github, server or anywhere that you need to access remotely through ssh.
How to Push code to Github: https://youtube.com/technicalbabaji/how-to-push-to-github/
How to Generate a SSH Key: https://docs.githbu.com/how-to-gen-a-key/
ssh-agent - How to configure, forwarding, protocol https://www.ssh.com/academy/ssh/agent