diff --git a/lib/ansible/runner/connection_plugins/paramiko_ssh.py b/lib/ansible/runner/connection_plugins/paramiko_ssh.py index 3ae76fe547..9c2c7bd529 100644 --- a/lib/ansible/runner/connection_plugins/paramiko_ssh.py +++ b/lib/ansible/runner/connection_plugins/paramiko_ssh.py @@ -185,6 +185,7 @@ class Connection(object): bufsize = 4096 try: chan = self.ssh.get_transport().open_session() + self.ssh.get_transport().set_keepalive(5) except Exception, e: msg = "Failed to open session" if len(str(e)) > 0: