[CentOS] ssh key question

Tue Sep 19 14:45:43 UTC 2006
Charles Lacroix <clacroix at cegep-ste-foy.qc.ca>

On Tuesday 19 September 2006 10:36, bruce wrote:
> hi...
>
> if i have a machine that i want to be able to automatically ssh into
> multiple child machines within the network, do i have to create a key for
> the parent machine, and supply the key to the child machines, or do i
> create a key for each child machine, and supply the keys to the parent?
>
> thanks
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos

If you want your main server to ssh to child servers, all you need is a key on 
the main server and than you share the .pub key ... and not the private key.

ssh-keygen -t dsa|rsa 
leave everything blank unless you want to encrypt the keys with a paraphrase 
and start to use ssh-agent 

Than put the public key in /home/user/.ssh/authorized_keys2 on each child and 
you should be pretty much all set.

manually connect at least once to make sure it all works like you intended to 
as a crontab script might take a while before it types in the " yes " or even 
worse a password !


later,
Charles

-- 
Charles Lacroix, Administrateur UNIX.
Service des télécommunications et des technologies
Cégep de Sainte-Foy
(418) 659-6600 # 4266