From Electron Cloud
Jump to: navigation, search
Line 1: Line 1:
 
*[http://oreilly.com/pub/h/66 my usual reference for SSH key exchange]
 
*[http://oreilly.com/pub/h/66 my usual reference for SSH key exchange]
  
(As also noted further down on that page) here's a script 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):
+
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
 
  #!/bin/sh
 
  cat ~/.ssh/id_rsa.pub | ssh -p 59721 root@${1} "cat - >> .ssh/authorized_keys"
 
  cat ~/.ssh/id_rsa.pub | ssh -p 59721 root@${1} "cat - >> .ssh/authorized_keys"

Revision as of 12:40, 14 October 2008

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 -p 59721 root@${1} "cat - >> .ssh/authorized_keys"