Failed to Connect via SSH to a new Deep Learning AMI EC2 on AWS

Last updated:

WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.

So you have tried to create an EC2 instance to run Deep Learning workloads on AWS (as per AWS: Machine Learning AMIs) but you can't SSH to your instance.

P.S.: For Deep Learning AMI with Source Code CUDA 8, Ubuntu use ec2-user as the username. For Deep Learning AMI with Source Code CUDA 9 use ubuntu as the username.

Deep Learning AMIs can only be launched on VPCs

This means that the VPC must be linked to an Internet Gateway in order to provide you with remote SSH access.

The funny thing is that this doesn't come configured by default, so you have to do it yourself or your connection attempts will time out.

Twitter Linkedin YC Hacker News Reddit

Create an Internet Gateway and Assign it

You must create an Internet Gateway (VPC Settings) and add a route to your subnet's Route Table:

Before:

before No Internet Gateway, that's why you can't SSH to your instance

After:

after After


References

Dialogue & Discussion