Node.js https pem error: routines:PEM_read_bio:no start line

You are probably using the wrong certificate file, what you need to do is generate a self signed certificate which can be done as follows openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out csr.pem openssl x509 -req -days 365 -in csr.pem -signkey key.pem -out server.crt then use the server.crt var options = { key: … Read more

How to read .pem file to get private and public key

Try this class. package groovy; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.GeneralSecurityException; import java.security.InvalidKeyException; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException; import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; import javax.crypto.Cipher; import org.apache.commons.codec.binary.Base64; public class RSA { private static String getKey(String filename) throws IOException { // Read … Read more

Connect over SSH using a .pem file

Use the -i option: ssh -i mykey.pem user@mydomain.example As noted in this answer, this file needs to have correct permissions set. The ssh man page says: SSH will simply ignore a private key file if it is accessible by others. You can change the permissions with this command: chmod go= mykey.pem That is, set permissions … Read more

Convert PEM to PPK file format

Use PuTTYGen Creating and Using SSH Keys Overview vCloud Express now has the ability to create SSH Keys for Linux servers. This function will allow the user to create multiple custom keys by selecting the “My Account/Key Management” option. Once the key has been created the user will be required to select the desired SSH … Read more

Converting pfx to pem using openssl

Another perspective for doing it on Linux… here is how to do it so that the resulting single file contains the decrypted private key so that something like HAProxy can use it without prompting you for passphrase. openssl pkcs12 -in file.pfx -out file.pem -nodes Then you can configure HAProxy to use the file.pem file. This … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)