mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
lib.SSHClientInternal: No key_filename in connect()
Remove the key_filename parameter from the call to Paramiko's connect(). It's user-dependent, and the current DevOps implementation relies on having a SSH_AUTH_SOCK in the environment, anyway. Signed-off-by: janware DevOps <devops@janware.com>
This commit is contained in:
parent
49daa86696
commit
f2ffe85b61
1 changed files with 4 additions and 2 deletions
|
|
@ -106,9 +106,11 @@ class SSHClientInternal(SSHClient): # export
|
|||
import paramiko # type: ignore # error: Library stubs not installed for "paramiko"
|
||||
ret = paramiko.SSHClient()
|
||||
ret.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
path_to_key=os.path.join(os.environ['HOME'], '.ssh', 'id_rsa')
|
||||
try:
|
||||
ret.connect(self.hostname, key_filename=path_to_key, allow_agent=True)
|
||||
ret.connect(
|
||||
hostname=self.hostname,
|
||||
allow_agent=True
|
||||
)
|
||||
except Exception as e:
|
||||
log(ERR, f'Failed to connect to {self.hostname} with key file {path_to_key} ({str(e)})')
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue