Skip to content

Instantly share code, notes, and snippets.

@Dimon70007
Created April 23, 2019 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dimon70007/e91ad3006930e84936fe2605320e2b9a to your computer and use it in GitHub Desktop.
Save Dimon70007/e91ad3006930e84936fe2605320e2b9a to your computer and use it in GitHub Desktop.
copy ssh key to new system
cp /path/to/my/key/id_rsa ~/.ssh/id_rsa
cp /path/to/my/key/id_rsa.pub ~/.ssh/id_rsa.pub
# change permissions on file
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
# start the ssh-agent in the background
eval $(ssh-agent -s)
# make ssh agent to actually use copied key
ssh-add ~/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment