Identity file not accessible while trying to SSH into an AWS EC2 instance

You need to have your private key setup properly in order to access an AWS EC2 instance using SSH. Follow below steps to fix “identity file not accessible” while trying to SSH into an AWS EC2 instance –

Step 1: Make sure you have the correct SSH private key file.

Step 2: Make sure your username and server ip or DNS is correct.

Step 3: Make sure your EC2 instance has port 22 opened

Step 4: Make sure your ssh private key file has permission set to 0400

Step 5: Now try to connect to your EC2 instance using SSH

Leave a Reply