Commits

Ian Bicking committed 130c5b7

Always use StrictHostKeyChecking=no option, which turns off known_hosts checking

Comments (0)

Files changed (2)

silverlining/commands/setup_node.py

 mkdir -p /root/.ssh
 cat >> /root/.ssh/authorized_keys
 ''',
-        ssh_args=['-o', 'StrictHostKeyChecking=no'],
         stdin=key)
     config.logger.notify(
         "Updating indexes and setting up rsync")

silversupport/shell.py

         command = 'sudo -H -u www-data %s' % command
     elif isinstance(command, (list, tuple)):
         command = ' '.join(conditional_shell_escape(i) for i in command)
-    ssh_args = kw.pop('ssh_args', [])
+    ssh_args = list(kw.pop('ssh_args', []))
+    strict_host_key_checking = kw.pop('strict_host_key_checking', False)
+    if not strict_host_key_checking:
+        ssh_args.extend(['-o', 'StrictHostKeyChecking=no'])
     return run(['ssh'] + ssh_args + ['-l', user, host, command], **kw)