There was an error while loading. Please reload this page.
1 parent ffa3a9b commit 8469849Copy full SHA for 8469849
1 file changed
libvirtnbdbackup/ssh/client.py
@@ -73,15 +73,13 @@ def connect(self) -> SSHClient:
73
cli = SSHClient()
74
cli.load_system_host_keys()
75
cli.set_missing_host_key_policy(AutoAddPolicy())
76
- connect_kwargs = {
77
- "hostname": self.host,
78
- "username": self.user,
79
- "port": self.port,
80
- "timeout": 5000,
81
- }
82
- if self.key_filename:
83
- connect_kwargs["key_filename"] = self.key_filename
84
- cli.connect(**connect_kwargs)
+ cli.connect(
+ hostname=self.host,
+ username=self.user,
+ port=self.port,
+ timeout=5000,
+ key_filename=self.key_filename,
+ )
85
return cli
86
except AuthenticationException as e:
87
raise exceptions.sshError(f"SSH key authentication failed: {e}")
0 commit comments