ec2ssh 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -1
- data/.travis.yml +0 -2
- data/ChangeLog.md +5 -0
- data/README.md +22 -0
- data/lib/ec2ssh/cli.rb +15 -2
- data/lib/ec2ssh/version.rb +1 -1
- metadata +2 -4
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -74
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -156,6 +156,28 @@ Updates ssh_config by 'my_key1' aws key:
|
|
156
156
|
$ ec2ssh update --aws-key my_key1
|
157
157
|
```
|
158
158
|
|
159
|
+
## ssh options
|
160
|
+
You can set other ssh options such as IdentityFile or User.
|
161
|
+
|
162
|
+
```
|
163
|
+
$ cat ~/.ec2ssh
|
164
|
+
---
|
165
|
+
path: /home/yourname/.ssh/config
|
166
|
+
aws_keys:
|
167
|
+
default:
|
168
|
+
access_key_id: ...
|
169
|
+
secret_access_key: ...
|
170
|
+
my_key1:
|
171
|
+
access_key_id: ...
|
172
|
+
secret_access_key: ...
|
173
|
+
regions:
|
174
|
+
- ap-northeast-1
|
175
|
+
ssh_options:
|
176
|
+
- "IdentityFile ~/.ssh/ec2.id_rsa"
|
177
|
+
- "User ec2-user"
|
178
|
+
- "TCPKeepAlive yes"
|
179
|
+
```
|
180
|
+
|
159
181
|
# How to upgrade from 1.x to 2.x
|
160
182
|
If you have used ec2ssh-1.x, it seems that you may not have '~/.ec2ssh'.
|
161
183
|
So you need execute `ec2ssh init` once to create `~/.ec2ssh`, and edit it as you like.
|
data/lib/ec2ssh/cli.rb
CHANGED
@@ -83,10 +83,23 @@ module Ec2ssh
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def merge_sections(config)
|
86
|
-
|
86
|
+
ssh_options = dotfile['ssh_options']
|
87
|
+
|
88
|
+
section_str = hosts.map { |h|
|
89
|
+
section = <<-END
|
87
90
|
Host #{h[:host]}
|
88
91
|
HostName #{h[:dns_name]}
|
89
|
-
|
92
|
+
END
|
93
|
+
|
94
|
+
unless ssh_options.nil?
|
95
|
+
ssh_options.each {|line|
|
96
|
+
section << " #{line}\n"
|
97
|
+
}
|
98
|
+
end
|
99
|
+
|
100
|
+
section
|
101
|
+
}.join
|
102
|
+
|
90
103
|
config.sections[options.aws_key] ||= SshConfig::Section.new(
|
91
104
|
options.aws_key,
|
92
105
|
section_str
|
data/lib/ec2ssh/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -69,11 +69,9 @@ extra_rdoc_files: []
|
|
69
69
|
files:
|
70
70
|
- .gitignore
|
71
71
|
- .rspec
|
72
|
-
- .rvmrc
|
73
72
|
- .travis.yml
|
74
73
|
- ChangeLog.md
|
75
74
|
- Gemfile
|
76
|
-
- Gemfile.lock
|
77
75
|
- Guardfile
|
78
76
|
- MIT-LICENSE
|
79
77
|
- README.md
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use 1.9.3
|
data/Gemfile.lock
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
ec2ssh (2.0.5)
|
5
|
-
aws-sdk (~> 1.8)
|
6
|
-
highline (~> 1.6)
|
7
|
-
thor (~> 0.14)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
addressable (2.3.4)
|
13
|
-
aws-sdk (1.10.0)
|
14
|
-
json (~> 1.4)
|
15
|
-
nokogiri (>= 1.4.4)
|
16
|
-
uuidtools (~> 2.1)
|
17
|
-
coderay (1.0.9)
|
18
|
-
crack (0.3.2)
|
19
|
-
diff-lcs (1.2.4)
|
20
|
-
ffi (1.8.1)
|
21
|
-
formatador (0.2.4)
|
22
|
-
guard (1.8.0)
|
23
|
-
formatador (>= 0.2.4)
|
24
|
-
listen (>= 1.0.0)
|
25
|
-
lumberjack (>= 1.0.2)
|
26
|
-
pry (>= 0.9.10)
|
27
|
-
thor (>= 0.14.6)
|
28
|
-
guard-rspec (2.6.0)
|
29
|
-
guard (>= 1.8)
|
30
|
-
rspec (~> 2.13)
|
31
|
-
highline (1.6.19)
|
32
|
-
json (1.8.0)
|
33
|
-
listen (1.1.3)
|
34
|
-
rb-fsevent (>= 0.9.3)
|
35
|
-
rb-inotify (>= 0.9)
|
36
|
-
rb-kqueue (>= 0.2)
|
37
|
-
lumberjack (1.0.3)
|
38
|
-
method_source (0.8.1)
|
39
|
-
nokogiri (1.5.9)
|
40
|
-
pry (0.9.12.2)
|
41
|
-
coderay (~> 1.0.5)
|
42
|
-
method_source (~> 0.8)
|
43
|
-
slop (~> 3.4)
|
44
|
-
rb-fsevent (0.9.3)
|
45
|
-
rb-inotify (0.9.0)
|
46
|
-
ffi (>= 0.5.0)
|
47
|
-
rb-kqueue (0.2.0)
|
48
|
-
ffi (>= 0.5.0)
|
49
|
-
rspec (2.13.0)
|
50
|
-
rspec-core (~> 2.13.0)
|
51
|
-
rspec-expectations (~> 2.13.0)
|
52
|
-
rspec-mocks (~> 2.13.0)
|
53
|
-
rspec-core (2.13.1)
|
54
|
-
rspec-expectations (2.13.0)
|
55
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
56
|
-
rspec-mocks (2.13.1)
|
57
|
-
slop (3.4.5)
|
58
|
-
thor (0.18.1)
|
59
|
-
timecop (0.6.1)
|
60
|
-
uuidtools (2.1.4)
|
61
|
-
webmock (1.11.0)
|
62
|
-
addressable (>= 2.2.7)
|
63
|
-
crack (>= 0.3.2)
|
64
|
-
|
65
|
-
PLATFORMS
|
66
|
-
ruby
|
67
|
-
|
68
|
-
DEPENDENCIES
|
69
|
-
ec2ssh!
|
70
|
-
guard-rspec (~> 2.4)
|
71
|
-
rb-fsevent (~> 0.9.1)
|
72
|
-
rspec (~> 2.12)
|
73
|
-
timecop (~> 0.5)
|
74
|
-
webmock (~> 1.9)
|