Skip to content

Commit

Permalink
Merge pull request #1592 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 4, 2024
2 parents 11c80d9 + db25b3f commit d419196
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions IM/SSH.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def __init__(self, host, user, passwd=None, private_key=None, port=22, proxy_hos
if (private_key is not None and private_key.strip() != ""):
# Avoid windows line endings
private_key = private_key.replace("\r", "")
# Assure final newline
if not private_key.endswith("\n"):
private_key += "\n"
self.private_key = private_key
private_key_obj = StringIO()
if os.path.isfile(private_key):
Expand Down

0 comments on commit d419196

Please sign in to comment.