I am having trouble sshing into my EC2 instances since I restarted my account. I connect to a new tmicro instance for about 4 minutes, but I get a broken pipe error and am thereafter unable to connect despite restarting the instance and my computer (timeout err).
I've confirmed that I'm connecting on port 22. I've confirmed that port 22 is open and unblocked. Shut off the firewall and all that. Connected to other sites via ssh. I have read through the troubleshooting on security groups and what not. It all seems very simple and obvious stuff that I haven't done wrong. Everything appears to be in order, as I confirmed launching an instance with an identical configuration as a friends, and we walked through the steps together over a hangout...
Can anybody advise on follow up? Has anybody encountered something like this with SSH in general? Nothing pops out to me in my logs or the server logs I can see on AWS. And it seems I've isolated most of the variables that I can in the steps I tried.
Firewall - "Shut off the firewall and all that" - are you using something like iptables on the instance itself? To keep things simple, I just use the AWS security groups because otherwise you need to maintain two firewalls which is confusing. Maybe there's an issue here. What do you mean by shutting the firewall off?
Logs - tail the ssh logs while you're still connected (I think tail -f /var/log/audit.log). Is there anything in there?
SSH - when you fail connect, use the -vvv flag and let us know what you get.
To prevent the broken pipe, you probably need to modify config in /etc/ssh/ssh_config. Look at ServerAliveInterval.
Related
I have a running instance on the Linux 2 AMI.
I have a default VPC and network interface.
Security groups taken care of, even opened all traffic and still got nothing.
There is an Internet Gateway
Routes are open on the VPC
The server is running
nginx is running
Once the instance is initiated and installed, all of this is ready
I can reach the http website the first 2-3 minutes, then it is unreacheable.
No idea why, everything else still running, can still ssh into the server, but http port 80 not running.
I opened everything from iptables, still nothing.
If I reboot the server, I get a minute where I can reach the server via http, but then a minute later its the same again.
I can reach http if I use $ wget http://localhost
So I think it is probably something from the EC2 control panel, not the instance itself.
I tried on new instances too.
Anyone has an idea?
The reason behind this weird behavior was that AWS abuse team had blocked some of my ports, had to upgrade to the developer plan to be able to know this, contacting them at the moment
I am following the code labs https://www.spinnaker.io/guides/tutorials/codelabs/gce-source-to-prod/ but I am facing a problem in creating server group in STEP-1. (Deploy stage). The page is getting loaded for infinite time. I think I can say It is not going beyond that point. I am able to come up to this step only if I am using AZURE or any other local machines. If I use Google Cloud Instance to do SSH tunneling I am not even able to create a application. Can you please help me.
You might need to do some additional troubleshooting to determine where the problem is. For example, run netstat on the machine to see whether it's listening on port 9000. See if you can create a firewall rule allowing inbound traffic on that port and then try to connect directly without using the SSH tunnel.
I've experienced two times now of the "No data received" issue ever since I've moved my WordPress site to use RDS.
Though I could still connect to my RDS via MySQLWorkbench, but not able to connect to my instance via SSH (It shows "Operation timed out") after this issue has happened each time.
Doing "ping" in Terminal would show that my instance is "100.0% packet loss", and rebooting the instance would not fix this issue neither. I've set the correct IP for the SSH in the security groups inbound rules, and also checked that my instance is appear to be running on the EC2 console. The browser would still returns "No data received.".
Interestingly, I've found that stopping the instance, and then restart the instance and the httpd service would fix the issue. However, this issue will always come back again after couple of hours.
Could anybody help me or guide me to troubleshoot it, please?
I have an weird issue with EC2 instance:
I start a new Ubuntu instance (or any other).
It initialize the instance and I can ping and connect via SSH, fine...
Suddenly, I can't ping anymore! :(
I have enabled all TCP, UDP and ICMP (inbound and outbound) connections in the instance's Security Group. But no luck.
I also have tried connecting via SSH using Putty. No luck too.
I have searched a lot, but everyone says about the Security Group, which I already had configured to allow all traffic.
Any help will be appreciated! Thanks!
Prints :
http://i.stack.imgur.com/7UtE6.jpg
http://i.stack.imgur.com/E3Ou8.jpg
PS: I don't have reputation to post the images directly... :(
I've just waited and now it seems to be ok.
Maybe it was just a matter of time, wait for AWS to apply the configuration to the EC2 instance (I am using the South America region, São Paulo). But it drove me crazy because I took almost a entire day to try to connect to the instance.
A while back I had created an RHEL EC2 instance. Set it up correctly and was able to connect to it through putty and WINSCP. Over time it hasn't been used but until recently it needed to be accessed again. I went to check to login but wasn't able to. So i reboot the instance and try to reconnect but I cannot anymore. I get the error "Network error: Connection refused."
I tried recreating the ppk from pem, and also enable all ports to all IP's. What could have caused this un-reachability and are there any troubleshooting tips for me to connect to it again?
There are a few things to check here:
Did you have anything running on the box that might have caused it to become unresponsive over time? This is somewhat unlikely since you said you rebooted the machine.
Check your security group settings to ensure that the firewall is not blocking your SSH port. The instance has no way of knowing whether connections will actually be accepted by the Amazon network on the SSH listening port.
Amazon hardware can fail and cause your instance to become unresponsive. Go to the Instances page on your EC2 console and see if 2/2 of the status checks are passing. If less than 2 are passing, this is probably a failed instance situation.
As a last resort, try right-clicking the instance and checking the system log for anything that might have caused the instance to not listen for SSH connections.
Hopefully you have your data on an EBS volume such that you can simply stop and start the instance and have it come up on different hardware. While it would be nice if Amazon provided console level access to the box, unfortunately they do not presently (as far as I know).