Repair file system openssl keygen
On folder /opt, just want to change the directory mode to 666, but run sudo chmod -R 666 ..
, then all commands like ‘ls’, ‘which’, ‘pwd’ do not work.
Fix
Login as root, runchmod 755 /
chmod 755 /bin
chmod 755 /usr
Openssl and Keygen
`
ssh public key stored in .ssh folder:
ssh-keygen -f koding -y > koding_id_rsa.pub
output public key from the private key
openssl rsa -in koding -pubout > koding-pub.pem
p12 file (usually with .pfx extension) contains certificate, public key, private key
openssl x509 - for certificate
openssl x509 -inform der -in certificate.cer -out certificate.pem (with -pubkey -noout to print public key only)
openssl pkcs12 - for p12 file
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes
openssl rsa - for private key
openssl rsa -in koding -out koding2 (Remove a passphrase from a private key)
openssl req - for private key and csr related
openssl req -out CSR.csr -key privateKey.key -new
`