On Sun, 2012-07-08 at 16:28 +0800, Richard Yang wrote: > Lucas, > > I just wrote a script to enable a list of machines can passwordless > access each other. While I suddenly thought it maybe useful for the > autotest server. > > So user could just type in the machine address and the password of root. > Don't to bother with how to generate the key and add to the known list. > > If you think this useful, here is my script. While of course we need to > change it a little for autotest server.
Sure, I'm reading it, thanks! I was checking your method to enable passwordless ssh and just noticed that: cmd = 'ssh -o ConnectTimeout=100 root@%s "rm -f /root/.ssh/id_rsa*; ssh-keygen -t rsa -f /root/.ssh/id_rsa -N \'\' -q"; cat /root/.ssh/id_rsa.pub' %(machine) There's a shorthand these days called ssh-copy-id, that will copy the key file and set the appropriate permissions, so this could become (bear in mind I'm just sketching things here): ssh-keygen -t rsa | yes ssh_cmd(ssh-copy-id 'root@%s' % machine) But bottom line, I'll think about what we can do to simplify this key set up process in autoserv. Cheers, Lucas _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
