use StricktHostKeyChecking=no ssh option
authorTony Mack <tmack@cs.princeton.edu>
Tue, 8 Dec 2009 19:56:49 +0000 (19:56 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 8 Dec 2009 19:56:49 +0000 (19:56 +0000)
sfa/methods/get_key.py

index dd9076c..d3416dc 100644 (file)
@@ -60,7 +60,9 @@ class get_key(Method):
         host = node['hostname']
         dest="/etc/sfa/nodekey.key" 
         identity = "/etc/planetlab/root_ssh_key.rsa"
-        scp_command = "/usr/bin/scp -i %(identity)s %(filename)s root@%(host)s:%(dest)s" % locals()
+        scp_options=" -i %(identity)s %(filename)s " % locals()
+        scp_options+="-o StrictHostKeyChecking=no " % locals()
+        scp_command = "/usr/bin/scp %(scp_options)s root@%(host)s:%(dest)s" % locals()
         (status, output) = commands.getstatusoutput(scp_command)
         if status:
             raise Exception, output