TO martin:
thanks
ssh-copy-id is so good .
and could you give me a sample in my situation using socat,I googled for it ,but I'm not quite understand it .... thanks again

Martin DeMello wrote:
On Wed, Jun 17, 2009 at 4:00 PM, niedh <[email protected] <mailto:[email protected]>> wrote:

    thanks for the reply
    Actually , my problem is :
    I had lots of linux servers, and I want to copy my id_rsa.pub to
    all these servers and append it to the ssh auth file,
    so i can ssh to these servers without enter the password later.
    i want to accomplish this task in ruby , so i write a script,
    iterater the server list, call system("scp .........")


Have you seen ssh-copy-id? Works better than manually patching and scping an auth file. Also, ssh doesn't let you pipe in a password; you need to use expect or socat for that. I recommend the latter; I've always found expect overly brittle. http://linux.com/news/software/developer/17942-socat-the-general-bidirectional-pipe-handler

martin

Reply via email to