Bhaktaraz

Web Enthusiastic, Nature Lover

Add SSH Keys to authorized_keys file

cat ~/.ssh/id_rsa.pub

Copy the key from terminal.

Then, login to server.

sudo vi ~/.ssh/authorized_keys

Paste your key.

Done!

Or,

cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Done!!

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.