Skip to content

Instantly share code, notes, and snippets.

@ratopi
Created October 19, 2019 10:28
Show Gist options
  • Save ratopi/59a1c07225509667db2d9b9287e7d4eb to your computer and use it in GitHub Desktop.
Save ratopi/59a1c07225509667db2d9b9287e7d4eb to your computer and use it in GitHub Desktop.
Erlang and SSH and RSA and PEM

Some notes about reading SSH-Keys in Erlang and using them

Converting SSH-Key to PEM

$ ssh-keygen -e -m pem -f .ssh/MYKEY.pub > /tmp/MYKEY.pub.pem

Reading public Key in Erlang

{ok, C} = file:read_file("/tmp/cloud.pub.pem"). public_key:pem_decode(C).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment