Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Latest commit

 

History

History
23 lines (17 loc) · 980 Bytes

File metadata and controls

23 lines (17 loc) · 980 Bytes

NOTE: This repository is no longer supported or updated. If you wish to continue to develop this code yourself, we recommend reaching out to the Skedulo org admins.

ProxyCommand helper for AWS EC2 Instance connect

Usage

.ssh/aws-proxy.sh [--profile profile] [--region region] [--key key] [--filter filterkey] user host [port]

Here filterkey is the name of the filter to the DescribeInstances API call - it defaults to private-ip-address

e.g. if all your instances in the 10.1.0.0 subnet are in ap-southeast-2, you can use the following ~/.ssh/config

Host 10.1.0.*
User ec2-user
ProxyCommand sh ~/.ssh/aws-proxy.sh --profile test-account --region ap-southeast-2 --key ~/.ssh/test-aws %r %h %p

Host ip-10-1-*
User ec2-user
ProxyCommand sh ~/.ssh/aws-proxy.sh --profile test-account --region ap-southeast-2 --filter private-dns-name --key ~/.ssh/test-aws %r %h %p