Warning: Identity file /path/to/key/pem not accessible: No such file or directory.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
That error is too obvious: you were specifying a non-existing private key.
When you finish creating an instance, if you choose to create a new keypair, AWS Console will ask you to download the private key and store it somewhere on your computer. The download can only be done once, and AWS expects you to keep that private key safely. You can use the same private key to access any new EC2 instance if the new instance is created with the same keypair as the old one. If you loose your private key, you won’t be able to access the instance created with corresponding keypair, and you have to create a new one (unless you’ve configured OpenSSH in your instance to allow logging in with password).
It’s worth to notice that,
/path/to/key/pem is just a dummy path to represent the location of private key. In reality, you have to replace it with the actual absolute/relative path of the private key that is actually stored on your computer.
The discussion is about I can’t ssh into my ec2 server, using the private key. it tells me permission denied. no such file or directory Prior to utilizing the sequential control center, award admittance to it at the record level. Then, at that point, make AWS Identity and Access Management (IAM) approaches that award admittance to IAM clients. Additionally, all occurrences utilizing the control center should have no less than one client with a secret word. In the event that the example can’t be reached and you have not arranged Serial Console access, adhere to the directions in techniques 2, 3, or 4. For data on designing see https://mobilunity.com/blog/offshore-software-development-services/