mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 10:10:46 +00:00
utils/ssh: Only attempt loading ssh keys if no password is supplied
In the case of connecting to a system without a password the password parameter needs to be set to an empty string which will currently still cause ssh keys to be loaded. Only check for ssh keys when the password is explicitly set to `None`.
This commit is contained in:
parent
a4f9231707
commit
4f10387688
@ -351,7 +351,7 @@ class SshConnection(SshConnectionBase):
|
|||||||
else:
|
else:
|
||||||
policy = AutoAddPolicy
|
policy = AutoAddPolicy
|
||||||
# Only try using SSH keys if we're not using a password
|
# Only try using SSH keys if we're not using a password
|
||||||
check_ssh_keys = not self.password
|
check_ssh_keys = self.password is None
|
||||||
|
|
||||||
with _handle_paramiko_exceptions():
|
with _handle_paramiko_exceptions():
|
||||||
client = SSHClient()
|
client = SSHClient()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user