Skip to content

Instantly share code, notes, and snippets.

@joekir
Last active October 5, 2018 22:59
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 joekir/784479b3ce6764305cbf1561c327f866 to your computer and use it in GitHub Desktop.
Save joekir/784479b3ce6764305cbf1561c327f866 to your computer and use it in GitHub Desktop.
reminder on how to gen rsa pub from priv and export to ssh pub
// generate rsa pub from priv
$ openssl rsa -in ~/.ssh/foo -pubout > foo.pub

// format that to ssh-rsa from the pubout
$ ssh-keygen -f ~/.ssh/foo.pub -i -mPKCS8 > bar.pub

// for some reason you can't redirect to the file being read in
$ mv bar.pub foo.pub

// correct perms
$ chmod 0644 foo.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment