mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
Fixing key-based authentication for SSH.
This commit is contained in:
parent
a26a50941b
commit
53f2eafd16
@ -42,8 +42,7 @@ def ssh_get_shell(host, username, password=None, keyfile=None, port=None, timeou
|
||||
conn = pxssh.pxssh()
|
||||
try:
|
||||
if keyfile:
|
||||
conn.SSH_OPTS += ' -i {}'.format(keyfile)
|
||||
conn.login(host, username, port=port, login_timeout=timeout)
|
||||
conn.login(host, username, ssh_key=keyfile, port=port, login_timeout=timeout)
|
||||
else:
|
||||
conn.login(host, username, password, port=port, login_timeout=timeout)
|
||||
except EOF:
|
||||
|
Loading…
x
Reference in New Issue
Block a user