Fix bug of known host
[remote-debug.git] / suanzi-support
index 678853d..183f6de 100755 (executable)
@@ -38,7 +38,7 @@ def getAvailablePort(host, ports):
 def exec_ssh(port):
     if port == None:
         raise Exception('Port not avaliable')
-    command = 'sshpass -p' + PASSWORD + ' ssh -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -fCR ' + str(port) +':localhost:22 ' + USER + '@' + SSH_SERVER + ' sleep ' + str(ALIVE_TIME)
+    command = 'sshpass -p' + PASSWORD + ' ssh -o "StrictHostKeyChecking=no"  -o "UserKnownHostsFile /dev/null" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -fCR ' + str(port) +':localhost:22 ' + USER + '@' + SSH_SERVER + ' sleep ' + str(ALIVE_TIME)
     print command
     return call(shlex.split(command), shell=False)