mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-06-24 01:06:01 +01:00
Fixing key-based authentication for SSH.
This commit is contained in:
@ -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:
|
||||||
|
Reference in New Issue
Block a user