Skip to content

Commit d419196

Browse files
authored
Merge pull request #1592 from grycap/devel
Fix error with SSH keys
2 parents 11c80d9 + db25b3f commit d419196

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

IM/SSH.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ def __init__(self, host, user, passwd=None, private_key=None, port=22, proxy_hos
117117
if (private_key is not None and private_key.strip() != ""):
118118
# Avoid windows line endings
119119
private_key = private_key.replace("\r", "")
120+
# Assure final newline
121+
if not private_key.endswith("\n"):
122+
private_key += "\n"
120123
self.private_key = private_key
121124
private_key_obj = StringIO()
122125
if os.path.isfile(private_key):

0 commit comments

Comments
 (0)