• Wincent
    Menu
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Increasing the security of encrypted SSH private keysEdit

Created 5/25/2013, updated 5/18/2017

From http://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html:

$ mv ~/.ssh/id_rsa ~/.ssh/id_rsa.old
$ openssl pkcs8 -topk8 -v2 des3 -in ~/.ssh/id_rsa.old -out ~/.ssh/id_rsa
$ chmod 600 ~/.ssh/id_rsa

After checking that the converted key works, delete the old one:

$ srm ~/.ssh/id_rsa.old

See man pkcs8 for more details.

  • ssh
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell with Rust (with help from Git and Neovim).