diff --git a/dvc/fs/ssh.py b/dvc/fs/ssh.py index 23f15f888..1947b3d6f 100644 --- a/dvc/fs/ssh.py +++ b/dvc/fs/ssh.py @@ -67,6 +67,7 @@ class SSHFileSystem(CallbackMixin, FSSpecWrapper): ) login_info["password"] = config.get("password") + login_info["passphrase"] = config.get("password") raw_keys = [] if config.get("keyfile"): diff --git a/tests/unit/fs/test_ssh.py b/tests/unit/fs/test_ssh.py index da5a544e6..a7372ddd6 100644 --- a/tests/unit/fs/test_ssh.py +++ b/tests/unit/fs/test_ssh.py @@ -34,10 +34,13 @@ def test_get_kwargs_from_urls(): def test_init(): - fs = SSHFileSystem(user="test", host="12.34.56.78", port="1234") + fs = SSHFileSystem( + user="test", host="12.34.56.78", port="1234", password="xxx" + ) assert fs.fs_args["username"] == "test" assert fs.fs_args["host"] == "12.34.56.78" assert fs.fs_args["port"] == "1234" + assert fs.fs_args["password"] == fs.fs_args["passphrase"] == "xxx" mock_ssh_config = """