1
(1) I use the following commands on computer A to generate authentication key for ssh from computer A to computer B
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub B:.ssh/authorized_keys2
(a) if further generate authentication key for ssh from computer A to computer C, how will you do it? is it a good way to simply use the same ~/.ssh/id_rsa.pub for A to B i.e.
scp ~/.ssh/id_rsa.pub C:.ssh/authorized_keys2
(b) if further generate authentication key for ssh from computer B to computer D, is it correct to repeat the commands for A to B on B?
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub D:.ssh/authorized_keys2
(2) There seems to be another method for A to B:
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub B
what's the difference between (2) and (1)? What will you do if use the commands of (2) in the cases (a) and (b) of (1), especially (b)?
Thanks and regards!
Thanks! I forgot to add passphrase when "ssh-keygen -t rsa". Anyway to add it later? – Tim – 2009-10-27T01:02:49.033
from "man ssh-keygen"
Thanks again! I forgot to ask if I further need to generate authentication keys for ssh from Computer E to Computer B, how to prevent overwriting the files .ssh/authorized_keys2 on B for A to B? And if for another computer F to B? – Tim – 2009-10-27T01:36:28.377