Adding SSH Key to SSH Agent


Check if SSH Agent is running

eval "$(ssh-agent -s)"

Add the Keys to SSH Agent

ssh-add ~/.ssh/nameofkey

Verify Keys Added to SSH Agent

ssh-add -l

Copy Key to Remote Server

ssh-copy-id user@remote.server.location

Copy Server Key to Host

ssh-copy-id user@host.local

If you see a warning “Permission 0664 for ‘key_id’ are too open”, do this:

chmod og-rw key_id

Originally posted here:

Leave a Reply