Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect from ec2 server

Tags:

amazon-ec2

I am trying to login on ec2 instance server, but I am getting me errors like

Too many authentication failures for ubuntu,

or

Permission Denied (Public key).

when I connect to the server with ssh -i "pem_file" ec2_name@public_ip

When yesterday, I was login in server, it's worked but after exit from server and again trying to login it's giving me errors which is mentions above.

like image 362
Rohit Yadav Avatar asked Jun 25 '15 13:06

Rohit Yadav


People also ask

Why am I unable to connect to a port on an EC2 Windows?

The following issues can prevent a connection to an EC2 Windows instance on a specific port: The service that uses the port isn't running on the instance. Windows Firewall is blocking traffic to the port. A security group is blocking traffic.

How do I check EC2 instance connectivity?

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Instances, and then select your instance. On the Networking tab, make note of the values for VPC ID and Subnet ID. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/ .


1 Answers

What eventually worked for me:

chmod 400 priv_key.pem               #or what you named it
ssh -o 'IdentitiesOnly yes' -i priv_key.pem [email protected]
like image 75
Kjetil S. Avatar answered Nov 11 '22 15:11

Kjetil S.