SSH Key Pairs

We discuss creating and using SSK Key Pairs in AWS so we can SSH into our instances.

You can also security connect to a server in a private subnet as outlined here.

Essentially you use an SSH Agent and forward the authentication agent when SSH'ing into a public instance. It looks a bit like this:

1# List keys in the agent
2ssh-add –L
3 
4ssh-add -K ~/.ssh/your-private-key.pem
5 
6# Get into the bastion host, use the -A flag
7# to forward the authentication agent
8ssh -A ubuntu@<ip-address>
9 
10# From within the public-network server, ssh into a private
11# server, which works as our private ssh key was forwarded
12# into the ssh agent on the public network server
13ssh ubuntu@<private-network-ip>

Don't miss out

Sign up to learn when new content is released! Courses are in production now.