diff --git a/gpMgmt/bin/gppylib/commands/base.py b/gpMgmt/bin/gppylib/commands/base.py index d4ad6c3c2c34c2bb10ad8cb79a51c55487ceaa36..02dcdd698823fc08711ba7a44dc232aea587b8ea 100755 --- a/gpMgmt/bin/gppylib/commands/base.py +++ b/gpMgmt/bin/gppylib/commands/base.py @@ -648,7 +648,7 @@ class RemoteExecutionContext(LocalExecutionContext): # Escape " for remote execution otherwise it interferes with ssh cmd.cmdStr = cmd.cmdStr.replace('"', '\\"') - cmd.cmdStr = "ssh -o 'StrictHostKeyChecking no' " \ + cmd.cmdStr = "ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 " \ "{targethost} \"{gphome} {cmdstr}\"".format(targethost=self.targetHost, gphome=". %s/greenplum_path.sh;" % self.gphome, cmdstr=cmd.cmdStr) diff --git a/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py b/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py index 4aea15eac6722fb8f97ea993cec9ea11b97e50c7..9d81eb97369b57c0484cf14a4b18675554c251e1 100644 --- a/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py +++ b/gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py @@ -72,7 +72,7 @@ class WorkerPoolTestCase(unittest.TestCase): cmd.propagate_env_map['foo'] = 1 cmd.propagate_env_map['bar'] = 1 self.subject.execute(cmd) - self.assertEquals("bar=1 && foo=1 && ssh -o \'StrictHostKeyChecking no\' localhost " + self.assertEquals("bar=1 && foo=1 && ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 localhost " "\". gphome/greenplum_path.sh; bar=1 && foo=1 && ls /tmp\"", cmd.cmdStr) def test_no_workders_in_WorkerPool(self):