Append private key from client to public key on host

You can append the contents of your private key to the public key on a server, with one command by doing the following:


cat ~/.ssh/id_rsa.pub | ssh serveruser@hostname.com 'cat >> ~/.ssh/authorized_keys'

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Facebook Twitter Email

Leave a Reply