EC2 Connection Problem

0

Earlier this year I switched my RDS database from EC2-Classic to a VPC. While I've been able to read/write to the database through my Localhost connection, I am now in the process of replacing my old EC2 connections (I haven't been hosting a web app, but have used EC2 in the past when I've needed to run long and potentially slow PHP scripts). It took a couple of tries, but I finally created a Linux EC2 instance that went through the VPC and I was able to connect via WinSCP and Putty. I changed the file permissions and transferred my code over. I tried to reconnect via Putty and am getting a "Network error: Connection refused" message. When I try to login to WinSCP, I'm getting a "Network Error Connection to ---- Refused." I tried stopping and restarting my EC2 connection and using the new public IP address and I'm getting the same errors. What do you think changed so that I can no longer access this connection? Should I just try the whole process again from the start?

zbdev
asked a year ago271 views
1 Answer
0

Hello zbdev,

So you have a RDS-database. To run scripts you've set up an EC2 linux instance with a public IP and currently you have problems connecting to that Instance via ssh key from your local computer. But initially you were able to connect and you pushed an ssh-keypair over and after a reconnect it was not possible anymore? Can you explain that? Did you create an additional sshkeypair on your local computer and pushed that to the ec2-instance? Does the connection with the aws-generated keypair work? Things to check:

profile picture
HeikoMR
answered a year ago
  • Thanks for the reply. I added a MyIP inbound rule with my security group and restarted the instance. I tried plugging in the new Public DNS and still couldn't connect to WinSCP or Putty. I tried the "Connect" option on the AWS EC2 Console and that generated this error message "EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance Connect." (Furthermore the help link PDF they provided is broken). Anyways, I'm stumped and don't have a better idea than to start this process over this afternoon. Thanks!

  • I created a new instance and was able to connect through that. I rebooted the instance this morning and was still able to login. I'm still not sure what happened with the original instance (hence my question), but I've gotten past this issue.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions