1. Use ssh-keygen to generate ssh key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
2. Input path of ssh key after promot, such as ‘~/.ssh
3. Start ssh-agent process
eval $(ssh-agent -s)
4. Add ssh private key into the SSH authentication agent
ssh-add ~/.ssh/id_rsa
5. Content of ~/.ssh/id_rsa.pub is public key you need