Skip to content

Commit

Permalink
Fix error with SSH keys
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jul 3, 2024
1 parent 84ad8a6 commit 3157841
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 3157841

Please sign in to comment.