- dest="/etc/sfa/nodekey.key"
- identity = "/etc/planetlab/root_ssh_key.pub"
- scp_command = "scp -i %(identity)s %(filename)s root@%(host)s:%(dest)s" % locals()
- (status, output) = commands(scp_command)
- if status:
- raise Exception, output
- os.unlink(filename)
+ key_dest="/etc/sfa/node.key"
+ gid_dest="/etc/sfa/node.gid"
+ scp = "/usr/bin/scp"
+ identity = "/etc/planetlab/root_ssh_key.rsa"
+ scp_options=" -i %(identity)s " % locals()
+ scp_options+="-o StrictHostKeyChecking=no " % locals()
+ scp_key_command="%(scp)s %(scp_options)s %(key_filename)s root@%(host)s:%(key_dest)s" %\
+ locals()
+ scp_gid_command="%(scp)s %(scp_options)s %(gid_filename)s root@%(host)s:%(gid_dest)s" %\
+ locals()
+
+ all_commands = [scp_key_command, scp_gid_command]
+
+ for command in all_commands:
+ (status, output) = commands.getstatusoutput(command)
+ if status:
+ raise Exception, output
+
+ for filename in [key_filename, gid_filename]:
+ os.unlink(filename)