Photo by Markus Winkler / Unsplash

How to Use Existing Ssh Key on Other Linux Machines

Linux Nov 10, 2021

You have to have ssh installed and running ofc :)

Copy your existing (from another machine) private and public key to ~/.ssh folder of the new linux machine and then do following commands on the new machine (example from ~/.ssh folder):

sudo chmod 600 id_ed25519
sudo chmod 600 id_ed25519.pub 
eval `ssh-agent -s`
ssh-add id_ed25519

Done! Test it:

ssh to your favorite server where your pub key has been added previously :)

Tags