Copy your SSH keys to remote server

By March 16, 2017Linux

cat ~/.ssh/id_rsa.pub | ssh root@example.com 'cat - >> ~/.ssh/authorized_keys'

Don’t forget you need local permissions set properly to use ssh keys.

chmod 700 ~/.ssh && chmod 600 ~/.ssh/*

Leave a Reply

avatar
  Subscribe  
Notify of