Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
Last active October 6, 2020 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruanbekker/bc841de33c64498a5c4c5a399d2a6ee9 to your computer and use it in GitHub Desktop.
Save ruanbekker/bc841de33c64498a5c4c5a399d2a6ee9 to your computer and use it in GitHub Desktop.
Convert SSH2 format public keys to OpenSSH format

SSH2 format will look like this:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20201005"
AAAA
....
abcdef==
---- END SSH2 PUBLIC KEY ----

And we will like to convert it to:

AAAA.....abcdef==

Solution:

$ ssh-keygen -i -f key_ssh2.pub > key.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment