-
Notifications
You must be signed in to change notification settings - Fork 48
SSH to AWS demo stack
Tim Donohue edited this page May 4, 2017
·
14 revisions
- Make sure you have the
~/.ssh/hybox
key first. If not, see the instructions in the section below. - Visit https://hybox.signin.aws.amazon.com/console and sign in.
- Click "Services > EC2"
- Click "Security Groups" in the sidebar (under Network & Security)
- Click region dropdown in topbar and select "N. Virginia" to see US East entries
- Select
demo-bastion
(I'm seeing two of these now, and I performed this operation for both) - Select "Inbound" from the tab below
- Click "Edit" button, then add a new rule with Type "SSH" and Source to "My IP"
- Click "Save" button
- Click "Instances" in the sidebar
- Click
demo-bastion
from the list - In the "Description" tab below, copy the "Public DNS" value
- In your console type
ssh -A -i ~/.ssh/hybox ec2-user@<paste DNS here>
to connect to the bastion host - Back in your browser, click
demo-webapp
(for instance) from the list - In the "Description" tab below, copy the "Private DNS" value
- 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 aPermission denied (publickey)
error, you may need to run thessh-add ~/.ssh/hybox
step from the instructions below.) - Once you've SSHed into the machine, you may be wondering how to see the demo-webapp data, etc. For hints on getting to the Rails Console and/or viewing the Database, see this guide
- Visit https://hybox.signin.aws.amazon.com/console and sign in.
- Click "S3"
- Click on "hybox-keys"
- Click on "key-pairs-us-east-1"
- Check the box next to "hybox" and download the SSH key to
~/.ssh/
- Make the new SSH identity file private in your console with
chmod 0600 ~/.ssh/hybox
- 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.