Skip to content

Instantly share code, notes, and snippets.

@sysarcher
Created April 25, 2016 14:38
Show Gist options
  • Save sysarcher/73aa8c6d216a905b983cbd141f3e2e5c to your computer and use it in GitHub Desktop.
Save sysarcher/73aa8c6d216a905b983cbd141f3e2e5c to your computer and use it in GitHub Desktop.
Given a Privake key file, get (hopefully) *your* public key back.

Purpose

Get a lost public key back from a private key in Linux

Generate public key from private

ssh-keygen -y -f my_private_key > ./my_private_key.pub

Permissions

Sometimes, linux complains about very open permissions... a chmod 0400 my_private_key should shut her up!

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