From Electron Cloud
Revision as of 12:41, 14 October 2008 by Ecloud (Talk | contribs)

Jump to: navigation, search

So for quick copying, to generate an SSH key pair on the client machine:

ssh-keygen -t rsa

and to send your client machine's key to any server on which you wish to be able to log in without a password (e.g. ~/bin/send-key):

#!/bin/sh
cat ~/.ssh/id_rsa.pub | ssh root@${1} "cat - >> .ssh/authorized_keys"

or if there is a non-standard port number:

#!/bin/sh
cat ~/.ssh/id_rsa.pub | ssh -p <the-port> root@${1} "cat - >> .ssh/authorized_keys"