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

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

Last updated:
Table of Contents

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.

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