0

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Here's my output with the -vvv option -- it is slightly different on my MBP running newer ssl but the error manifests the same way if i ssh from there to a new instance
oh I have ServerAliveInterval set to to 120 from prior googling/troubleshooting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.