From 049dc4e7874fe73c600469542e5826a188dbc03d Mon Sep 17 00:00:00 2001 From: Peng Li Date: Fri, 22 Jun 2018 17:26:06 +0800 Subject: [PATCH] Fix bug of known host --- suanzi-support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suanzi-support b/suanzi-support index 678853d..183f6de 100755 --- a/suanzi-support +++ b/suanzi-support @@ -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) -- 2.11.0