Ssh key parsing

From UVOO Tech Wiki
Revision as of 16:54, 10 March 2022 by Busk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://github.com/nigelm/ssh2_parse_key

pip3 install ssh2-parse-key
from ssh2_parse_key import Ssh2Key

public_key="""---- BEGIN SSH2 PUBLIC KEY ----
...
---- END SSH2 PUBLIC KEY ----"""

pubkey = Ssh2Key.parse(public_key)[0]
openssh_pubkey = pubkey.openssh()