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 for group and others equal to the empty list of permissions.

Leave a Comment

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