[Python-modules-team] Bug#947470: paramiko: [Py3] TypeError: a bytes-like object is required, not 'str' in pkey.write_private_key()

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Fri Dec 27 13:31:35 GMT 2019


Package: src:paramiko
Version: 2.6.0-1
Severity: important
Control: tags -1 patch
Control: forwarded -1 https://github.com/paramiko/paramiko/pull/1583

With the above Python Paramiko version (when used under Python3),  
writing of SSH private keys to the file system currently fails with  
this Python exception:

```
   File  
"<local-path>/pyhoca-gui.upstream/pyhoca-gui/x2go/backends/terminal/plain.py",  
line 936, in share_local_folder
     _auth_rsakey.write_private_key(_tmp_io_object)
   File "/usr/lib/python3/dist-packages/paramiko/rsakey.py", line 154,  
in write_private_key
     password=password,
   File "/usr/lib/python3/dist-packages/paramiko/pkey.py", line 367,  
in _write_private_key
     serialization.Encoding.PEM, format, encryption
TypeError: a bytes-like object is required, not 'str'
```

I filed a PR upstream that fixes the issue:
https://github.com/paramiko/paramiko/pull/1583

As Paramiko upstream is really slow with accepting code changes,  
please consider cherry-pick the patch to the Debian paramiko package.

Currently, local folder sharing is broken in Python X2Go because of this.

Thanks+Greets,
Mike
-- 

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: Digitale PGP-Signatur
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20191227/8d8efc03/attachment.sig>


More information about the Python-modules-team mailing list