From e0a0342ab3594c1594e12086619fd81ebb5550ef Mon Sep 17 00:00:00 2001 From: Laurens Duijvesteijn Date: Mon, 8 Mar 2021 21:59:26 +0100 Subject: [PATCH] fs: ssh: pass timeout to paramiko's connect() (#5569) Prior to this commit, DVC could hang indefinitely when connecting to remote SSH filesystems. This should address this. --- dvc/fs/ssh/connection.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dvc/fs/ssh/connection.py b/dvc/fs/ssh/connection.py index 55ec70fe4..6374a9c42 100644 --- a/dvc/fs/ssh/connection.py +++ b/dvc/fs/ssh/connection.py @@ -40,7 +40,9 @@ class SSHConnection: host=host, **kwargs ) ) - self.timeout = kwargs.get("timeout", 1800) + + kwargs.setdefault("timeout", 1800) + self.timeout = kwargs["timeout"] self._ssh = paramiko.SSHClient()