dropping your ssh key on a remote server one-liner





6
Date Submitted Mon. Aug. 14th, 2006 7:43 AM
Revision 1 of 1
Scripter bertheymans
Tags bash | shell | ssh
Comments 3 comments
This adds your ssh public key to the authorized_keys on a remote server. The key file in the snippet is called id_dsa.pub, yours may have another name but this is standard for DSA encryption.

To learn more about ssh I heartly recommend this: SSH tips and tricks


cat ~/.ssh/id_dsa.pub | ssh you@example.com "cat - >> ~/.ssh/authorized_keys"

 

Bert Heymans

blog.heymans.org

Comments

Comments Pure genius!
Thu. Sep. 21st, 2006 11:16 PM    Scripter sehrgut
Comments Meant to vote up =/
Mon. Aug. 14th, 2006 2:31 PM    Helper bobbyrward
  Comments remote command
Tue. Aug. 15th, 2006 6:35 AM    Scripter bertheymans

Voting