Skip to content

Instantly share code, notes, and snippets.

@devzom
Created December 20, 2021 10:33
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 devzom/aa97388cd8ba54e1d86c961a598361cc to your computer and use it in GitHub Desktop.
Save devzom/aa97388cd8ba54e1d86c961a598361cc to your computer and use it in GitHub Desktop.
SSH: How to use existing SSH key on my newly installed Ubuntu
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