Seems people prefer the hard coded solutions. So I am proposing a simpler
patch.
Please review.
Thanks.
On Fri, Jan 15, 2010 at 7:22 AM, John Admanski <[email protected]> wrote:
> 2010/1/15 Lucas Meneghel Rodrigues <[email protected]>:
> > On Thu, Jan 14, 2010 at 10:34 PM, Martin Bligh <[email protected]>
> wrote:
> >> John, Steve - this looks generally correct to me. If this is going to
> >> break you guys,
> >> I guess we can make it configurable (but default on), but don't think
> >> it'll cause
> >> problems?
> >
> > -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null seems very
> > reasonable flags to use since we are dealing with test machines, and
> > those get reinstalled frequently. Every time I have to reinstall a
> > client machine, I have to cleam entries on known_hosts (and I confess
> > I am still doing it manually, wich is a PITA).
> >
> > I'd just add them to the ssh flags, but indeed need to check with John
> > and Steve if this is going to have side effects. I see none.
> >
>
> These options are fine with me.
>
> -- John
>
--
Eric Li
李咏竹
Google Kirkland
Index: server/hosts/abstract_ssh.py
===================================================================
--- server/hosts/abstract_ssh.py (revision 4114)
+++ server/hosts/abstract_ssh.py (working copy)
@@ -8,10 +8,10 @@
enable_master_ssh = global_config.get_config_value(
'AUTOSERV', 'enable_master_ssh', type=bool, default=False)
-
def make_ssh_command(user="root", port=22, opts='', connect_timeout=30,
alive_interval=300):
- base_command = ("/usr/bin/ssh -a -x %s -o BatchMode=yes "
+ base_command = ("/usr/bin/ssh -a -x %s -o StrictHostKeyChecking=no "
+ "-o UserKnownHostsFile=/dev/null -o BatchMode=yes "
"-o ConnectTimeout=%d -o ServerAliveInterval=%d "
"-l %s -p %d")
assert isinstance(connect_timeout, (int, long))
@@ -107,7 +107,8 @@
appropriate scp command for encoding it. Remote paths must be
pre-encoded.
"""
- command = "scp -rq %s -P %d %s '%s'"
+ command = ("scp -rq %s -o StrictHostKeyChecking=no "
+ "-o UserKnownHostsFile=/dev/null -P %d %s '%s'")
return command % (self.master_ssh_option,
self.port, " ".join(sources), dest)
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest