aws-ssh-resolver 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b42c80586cba35d4917fba72f764eba15bdb57
|
4
|
+
data.tar.gz: d7fe8b98efb41cd92e415a32e601534e134eafd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ea88291e226d0cd730e7f8ff6a497a97734cfdf4302a7b143708e7095f2be6a8116bb00461f2f457be9f53534b1fda40c14cd6ab812fd78c5b9d77e9b574df0
|
7
|
+
data.tar.gz: d7d6ea498c200312ac63aac4fbd0fcfc5e21c796916472e2925181fcd996070715984d8f3cc901848afa686ac0cd93ba208c0b8fe3043ebb63c55b497ad6017f
|
data/README.md
CHANGED
@@ -1,35 +1,21 @@
|
|
1
|
-
# aws-ssh-resolver - Resolve AWS EC2 HostNames for OpenSSH configuration - $Release:0.0.
|
1
|
+
# aws-ssh-resolver - Resolve AWS EC2 HostNames for OpenSSH configuration - $Release:0.0.3$
|
2
2
|
|
3
3
|
`aws-ssh-resolver` keeps AWS EC2 HostNames in OpenSSH configuration
|
4
|
-
file in sync with Amazon cloud making it easier for
|
5
|
-
|
4
|
+
file in sync with Amazon cloud making it easier for to use OpenSSH,
|
5
|
+
and related tools, on Amazon Platform.
|
6
6
|
|
7
7
|
## The Problem
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
only on the network that the instance is in. An instance may be
|
13
|
-
assigned a Public IP Address, and corresponding Public DNS name. The
|
14
|
-
Public IP is accessible from the Internet, and the Public DNS name is
|
15
|
-
resolvable outside the network of the instance. Public IPs come from
|
16
|
-
Amazon's pool of public IP address, and an instance may not reuse the
|
17
|
-
IP address, once it is released. For example, stopping, or
|
18
|
-
terminating, an instance releases the Public IP Address. See Amazon
|
19
|
-
[documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html)
|
20
|
-
for more details.
|
21
|
-
|
22
|
-
|
23
|
-
Amazon EC2 Instance IP Addressing presents several challenges for SSH
|
24
|
-
usage, or any SSH related tool e.g.
|
25
|
-
[ansible](http://www.ansible.com/home),
|
9
|
+
[Amazon EC2 Instance IP Addressing](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html)
|
10
|
+
sets several challenges for SSH usage, and for any tool using SSH
|
11
|
+
connections e.g. [ansible](http://www.ansible.com/home),
|
26
12
|
[fabric](http://www.fabfile.org/),
|
27
13
|
[serverspec](http://serverspec.org/) etc.
|
28
14
|
|
29
|
-
* Public DNS
|
30
|
-
is assigned a new IP address, it also gets a new Public DNS
|
31
|
-
essence this means that the task of managing DNS names
|
32
|
-
comparable to the task of managing IP addresses.
|
15
|
+
* Amazon Public DNS Names encode Public IP Addresses. Each time an
|
16
|
+
instance is assigned a new IP address, it also gets a new Public DNS
|
17
|
+
name. In essence this means that the task of managing DNS names
|
18
|
+
becomes comparable to the task of managing IP addresses.
|
33
19
|
|
34
20
|
* Using an IP address to contact an instance is complicated, because
|
35
21
|
Public IP Address, once released, cannot be reused. Using fixed IP
|
@@ -62,7 +48,10 @@ addresses the challenges above
|
|
62
48
|
configuration in OpenSSH allows users to create a transparent
|
63
49
|
multihop SSH connection to EC2 instances with Private IP Address
|
64
50
|
only
|
65
|
-
|
51
|
+
|
52
|
+
For more background information, see
|
53
|
+
[blog post](https://jarjuk.wordpress.com/2015/09/08/using-openssh-on-aws-platform/#more-273https://jarjuk.wordpress.com/2015/09/08/using-openssh-on-aws-platform/#more-273).
|
54
|
+
|
66
55
|
## Usage
|
67
56
|
|
68
57
|
### Installation
|
@@ -84,11 +73,10 @@ file `ssh/config.aws` with any fixed configuration. Running
|
|
84
73
|
**aws-ssh-resolver** updates this file, but does not interfere with
|
85
74
|
the content user has entered.
|
86
75
|
|
87
|
-
**Notice**:
|
88
|
-
|
89
|
-
`ssh/config.aws`
|
90
|
-
|
91
|
-
nncontrol system.
|
76
|
+
**Notice**: The first **aws-ssh-resolver** run creates the initial
|
77
|
+
version of `ssh/config.aws` automatically using `ssh/config.init`, if
|
78
|
+
`ssh/config.aws` -file does not exist, . This avoids the need to check
|
79
|
+
in the mutable `ssh/config.aws` into a version control system.
|
92
80
|
|
93
81
|
### Update OpenSSH Configuration file
|
94
82
|
|
@@ -98,7 +86,7 @@ command:
|
|
98
86
|
|
99
87
|
aws ec2 describe-instances | bundle exec aws-ssh-resolver.rb resolve
|
100
88
|
|
101
|
-
The command
|
89
|
+
The command extracts EC2 Tag/DNS information, and writes
|
102
90
|
`host`/`HostName` configuration entries in `ssh/config.aws` -file. In
|
103
91
|
this file `host` value is taken from `Name` tag on an EC2 instance,
|
104
92
|
and `HostName` value is taken from `PublicDnsName` on an EC2
|
@@ -207,7 +195,7 @@ OpenSSH uses the proxy definition to access it.
|
|
207
195
|
|
208
196
|
### Using OpenSSH Configuration to Access ASW Instances
|
209
197
|
|
210
|
-
The configuration in `ssh/
|
198
|
+
The configuration in `ssh/config.aws` allows us to use tag name
|
211
199
|
`myFront1` to make a SSH connection to machine with the DNS name
|
212
200
|
`c2-52-19-117-227.eu-west-1.compute.amazonaws.com` simply with command
|
213
201
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-ssh-resolver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jarjuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|