diff --git a/dpdispatcher/contexts/ssh_context.py b/dpdispatcher/contexts/ssh_context.py index 52259cd3..e465e149 100644 --- a/dpdispatcher/contexts/ssh_context.py +++ b/dpdispatcher/contexts/ssh_context.py @@ -295,7 +295,7 @@ def exec_command(self, cmd): assert self.ssh is not None try: return self.ssh.exec_command(cmd) - except (paramiko.ssh_exception.SSHException, socket.timeout) as e: + except (paramiko.ssh_exception.SSHException, socket.timeout, EOFError) as e: # SSH session not active # retry for up to 3 times # ensure alive