SSH key migration
- Copy your files to
~/.ssh.
cp /path/to/my/key/id_rsa ~/.ssh/id_rsa
cp /path/to/my/key/id_rsa.pub ~/.ssh/id_rsa.pub
- Change permissions of files
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 644 ~/.ssh/id_rsa.pub
- Start the ssh-agent in the background and add the key to agent
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
NOTE: If using
fishshell,then just execute thessh-agent -sand then export those printed vars. No need to import public key.