I'm trying to create the SSH connection to EC2 instance but getting the error message that the keypair file does not exist.
AWS Management Console confirms that the keypair file exists:
Making connection to EC2 instance is fine but its seems that there aren't any files:
AWS Management Console confirms that the right command to set permissions is:
chmod 400 tauno537_aws_keypair.pem
When trying to execute this, it gives the following error message:
chmod: cannot access ‘tauno537_aws_keypair.pem’: No such file or directory
When trying to create the SSH connection to EC2 instance, it gives the following error message:
ssh ec2-user@x.xxx.xxx.xxx -i tauno537_aws_keypair.pem
Warning: Identity file tauno537_aws_keypair.pem not accessible: No such file or directory.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
What I have done wrong? Is it correct that when...
- Making connection to EC2 instance (PuTTY login), the private key needs to be used?
- Creating SSH connection, the public key needs to be used?
What's the diference between PuTTY login and SSH connection at all? Doesn't they both mean that making the connection to the EC2 instance?
ls -gAlFh
to see the file listing in more detail. – Software Engineer