Last active
October 2, 2024 14:21
-
-
Save mingfang/4aba327add0807fa5e7f to your computer and use it in GitHub Desktop.
Convert id_rsa to pem file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 600 id_rsa.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some of the examples above contain insecure use of chmod.
In general to create a file securely, always set the
umask
first! e.g....if you don't do that, then your file creation is subject to a race condition, and can be maliciously read between you creating it, and chmodding it...