Cannot connect to EC2 instance more than once via SSH (OSX Terminal)

1

Update

This may be to do with my account potentially being in an 'isolated' state as per this post: https://forums.aws.amazon.com/thread.jspa?start=0&threadID=239202&tstart=0

I'm going to contact AWS and ask them if this is the issue.

Original Post

I'm fairly new to AWS but getting a recurring problem with connecting to EC2 via SSH. In short, I seem to be only able to connect once via SSH to my instance - all future attempts time out. The only fix is to stop it and start it each time.

Here is as much detail as I can provide - really hoping you guys can help me out here!

Notes: - Not that it matters but when I do successfully SSH in, I can curl webpages and get a response - I'm tethering from my phone but doesn't seem to be affecting things (I think this didn't work at home either) - If I just wait a minute or two after first SSH'ing in and exiting, when I try to reconnect after a couple of mins it will just time out

Thanks in advance.

Rajtastic

Posted 2019-06-23T14:37:04.127

Reputation: 11

if you have some application running and if it's a t2/t3 series instance, your instance is mostly likely running out of CPU credits leaving no processing power to establish the connection. Please [edit] your post and add details of what type of instance, what processes are running and cloudwatch graphs as well – Sathyajith Bhat – 2019-06-23T16:49:26.633

Thanks a lot @SathyajithBhat - I've updated the post accordingly – Rajtastic – 2019-06-30T11:55:09.090

Answers

0

Issue was that AWS had for some reason set an 'isolated' flag in my account (I must have deactivated this a long time ago and it still had that flag on).

FYI I don think you can see this 'isolated' flag anywhere in the UI but if you raise a case with AWS they very quickly checked and removed it.

Rajtastic

Posted 2019-06-23T14:37:04.127

Reputation: 11