mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +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()
|
conn = pxssh.pxssh()
|
||||||
try:
|
try:
|
||||||
if keyfile:
|
if keyfile:
|
||||||
conn.SSH_OPTS += ' -i {}'.format(keyfile)
|
conn.login(host, username, ssh_key=keyfile, port=port, login_timeout=timeout)
|
||||||
conn.login(host, username, port=port, login_timeout=timeout)
|
|
||||||
else:
|
else:
|
||||||
conn.login(host, username, password, port=port, login_timeout=timeout)
|
conn.login(host, username, password, port=port, login_timeout=timeout)
|
||||||
except EOF:
|
except EOF:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user