ssh: support passphrases for private keys (#6566)

This commit is contained in:
Batuhan Taskaya
2021-09-09 01:51:02 +03:00
committed by GitHub
parent 2d9f36176a
commit ff6e88296d
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -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"):
+4 -1
View File
@@ -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 = """