1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +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:
Marc Bonnici 2020-05-12 17:29:41 +01:00
parent a4f9231707
commit 4f10387688

View File

@ -351,7 +351,7 @@ class SshConnection(SshConnectionBase):
else:
policy = AutoAddPolicy
# 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():
client = SSHClient()