mirakui/ec2ssh — pull request #10 by bash0C7 (2013-05-10 09:59:15+00:00)
Title: Added VPC support

- Added: Optional parameter "--dns-name-key"
- for get private host name from VPC (no global IP) instance.
- Changed: 'Name' tag + instance id is used as Host description.
- because set same 'Name' by Auto Scaling Group.
- Added: ssh_config_keywords in dotfile
- because set 'ProxyCommand' after Host description

````
Host XXXXXXXXXXXX_i-1XXXXXXX.ap-northeast-1
HostName ip-XXX-XXX-XX.ap-northeast-1.compute.internal
ProxyCommand ssh -o ServerAliveInterval=60 XXXXXXXXXX %h %p
````

# How to Use

## non VPC
- (same as before)
## VPC

### 1. Append bastion server information to .ec2ssh

example

````
path: /path/to/ssh_config
aws_keys:
default:
access_key_id: YOUR_ACCESS_KEY_ID
secret_access_key: YOUR_SECRET_ACCESS_KEY
regions:
- ap-northeast-1
ssh_config_keywords:
- ProxyCommand ssh -o ServerAliveInterval=60 YOUR_BASTION_SERVER nc %h %p
````

### 2. Execute ec2ssh update with "--dns-name-key private_dns_name" option

````
$ ec2ssh update --dns-name-key private_dns_name
````