Skip to content

SSH to AWS demo stack

Joe Atzberger edited this page Apr 27, 2017 · 14 revisions
  1. Make sure you have the ~/.ssh/hybox key first. If not, see the instructions in the section below.
  2. Visit https://hybox.signin.aws.amazon.com/console and sign in.
  3. Click "Services > EC2"
  4. Click "Security Groups" in the sidebar (under Network & Security)
  5. Click region dropdown in topbar and select "N. Virginia" to see US East entries
  6. Select "demo-bastion" (I'm seeing two of these now, and I performed this operation for both)
  7. Select "Inbound" from the tab below
  8. Click "Edit" button, then add a new rule with Type "SSH" and Source to "My IP"
  9. Click "Save" button
  10. Click "Instances" in the sidebar
  11. Click "demo-bastion" from the list
  12. In the "Description" tab below, copy the "Public DNS" value
  13. In your console type ssh -A -i ~/.ssh/hybox ec2-user@<paste DNS here> to connect to the bastion host
  14. Back in your browser, click "demo-webapp" (for instance) from the list
  15. In the "Description" tab below, copy the "Private DNS" value
  16. Now you can SSH to any other machine in the cluster via e.g. ssh ip-10-0-5-178.ec2.internal (If you get a Permission denied (publickey) error, you may need to run the ssh-add ~/.ssh/hybox step from the instructions below.)

Getting the SSH key

  1. Visit https://hybox.signin.aws.amazon.com/console and sign in.
  2. Click "S3"
  3. Click on "hybox-keys"
  4. Click on "key-pairs-us-east-1"
  5. Check the box next to "hybox" and download the SSH key to ~/.ssh/
  6. Make the new SSH identity file private in your console with chmod 0600 ~/.ssh/hybox
  7. In your console, add your key to the identity: ssh-add ~/.ssh/hybox

Note: You would need to ssh-add again after restarting. Or use -K to retain the key persistently.