Skip to content

Commit

Permalink
Merge pull request #1588 from grycap/devel
Browse files Browse the repository at this point in the history
Fix error with SSH keys
  • Loading branch information
micafer authored Jul 3, 2024
2 parents cde5e88 + 3157841 commit 458f0f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion IM/SSH.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def __init__(self, host, user, passwd=None, private_key=None, port=22, proxy_hos
private_key_obj.write(line)
pkfile.close()
else:
private_key_obj.write(private_key)
# Avoid windows line endings
private_key_obj.write(private_key.replace("\r", ""))

private_key_obj.seek(0)
self.private_key_obj = paramiko.RSAKey.from_private_key(
Expand Down

0 comments on commit 458f0f6

Please sign in to comment.