net-ssh 5.2.0 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/.dockerignore +6 -0
- data/.github/config/rubocop_linter_action.yml +4 -0
- data/.github/workflows/ci-with-docker.yml +44 -0
- data/.github/workflows/ci.yml +87 -0
- data/.github/workflows/rubocop.yml +13 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +16 -2
- data/.rubocop_todo.yml +623 -511
- data/CHANGES.txt +50 -2
- data/Dockerfile +27 -0
- data/Dockerfile.openssl3 +17 -0
- data/Gemfile +2 -0
- data/Gemfile.noed25519 +2 -0
- data/Manifest +0 -1
- data/README.md +293 -0
- data/Rakefile +6 -2
- data/appveyor.yml +4 -2
- data/docker-compose.yml +23 -0
- data/lib/net/ssh/authentication/agent.rb +29 -13
- data/lib/net/ssh/authentication/certificate.rb +19 -7
- data/lib/net/ssh/authentication/constants.rb +0 -1
- data/lib/net/ssh/authentication/ed25519.rb +13 -8
- data/lib/net/ssh/authentication/ed25519_loader.rb +5 -8
- data/lib/net/ssh/authentication/key_manager.rb +73 -32
- data/lib/net/ssh/authentication/methods/abstract.rb +12 -3
- data/lib/net/ssh/authentication/methods/hostbased.rb +3 -5
- data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +5 -3
- data/lib/net/ssh/authentication/methods/none.rb +6 -9
- data/lib/net/ssh/authentication/methods/password.rb +2 -3
- data/lib/net/ssh/authentication/methods/publickey.rb +56 -16
- data/lib/net/ssh/authentication/pageant.rb +97 -97
- data/lib/net/ssh/authentication/pub_key_fingerprint.rb +2 -3
- data/lib/net/ssh/authentication/session.rb +27 -23
- data/lib/net/ssh/buffer.rb +51 -40
- data/lib/net/ssh/buffered_io.rb +24 -26
- data/lib/net/ssh/config.rb +82 -50
- data/lib/net/ssh/connection/channel.rb +101 -87
- data/lib/net/ssh/connection/constants.rb +0 -4
- data/lib/net/ssh/connection/event_loop.rb +30 -25
- data/lib/net/ssh/connection/keepalive.rb +12 -12
- data/lib/net/ssh/connection/session.rb +115 -111
- data/lib/net/ssh/connection/term.rb +56 -58
- data/lib/net/ssh/errors.rb +12 -12
- data/lib/net/ssh/key_factory.rb +10 -13
- data/lib/net/ssh/known_hosts.rb +106 -39
- data/lib/net/ssh/loggable.rb +10 -11
- data/lib/net/ssh/packet.rb +1 -1
- data/lib/net/ssh/prompt.rb +9 -11
- data/lib/net/ssh/proxy/command.rb +1 -2
- data/lib/net/ssh/proxy/errors.rb +2 -4
- data/lib/net/ssh/proxy/http.rb +18 -20
- data/lib/net/ssh/proxy/https.rb +8 -10
- data/lib/net/ssh/proxy/jump.rb +8 -10
- data/lib/net/ssh/proxy/socks4.rb +2 -4
- data/lib/net/ssh/proxy/socks5.rb +3 -6
- data/lib/net/ssh/service/forward.rb +9 -8
- data/lib/net/ssh/test/channel.rb +24 -26
- data/lib/net/ssh/test/extensions.rb +35 -35
- data/lib/net/ssh/test/kex.rb +6 -8
- data/lib/net/ssh/test/local_packet.rb +0 -2
- data/lib/net/ssh/test/packet.rb +3 -3
- data/lib/net/ssh/test/remote_packet.rb +6 -8
- data/lib/net/ssh/test/script.rb +25 -27
- data/lib/net/ssh/test/socket.rb +12 -15
- data/lib/net/ssh/test.rb +7 -7
- data/lib/net/ssh/transport/algorithms.rb +100 -58
- data/lib/net/ssh/transport/cipher_factory.rb +34 -50
- data/lib/net/ssh/transport/constants.rb +13 -9
- data/lib/net/ssh/transport/ctr.rb +8 -14
- data/lib/net/ssh/transport/hmac/abstract.rb +20 -5
- data/lib/net/ssh/transport/hmac/md5.rb +0 -2
- data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
- data/lib/net/ssh/transport/hmac/none.rb +0 -2
- data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
- data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
- data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
- data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
- data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
- data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
- data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
- data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
- data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
- data/lib/net/ssh/transport/hmac.rb +13 -11
- data/lib/net/ssh/transport/identity_cipher.rb +11 -13
- data/lib/net/ssh/transport/kex/abstract.rb +130 -0
- data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
- data/lib/net/ssh/transport/kex/curve25519_sha256.rb +39 -0
- data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
- data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +5 -19
- data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
- data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +30 -139
- data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +1 -8
- data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
- data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +20 -81
- data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
- data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
- data/lib/net/ssh/transport/kex.rb +15 -10
- data/lib/net/ssh/transport/key_expander.rb +7 -8
- data/lib/net/ssh/transport/openssl.rb +149 -127
- data/lib/net/ssh/transport/packet_stream.rb +50 -16
- data/lib/net/ssh/transport/server_version.rb +17 -16
- data/lib/net/ssh/transport/session.rb +9 -7
- data/lib/net/ssh/transport/state.rb +44 -44
- data/lib/net/ssh/verifiers/accept_new.rb +0 -2
- data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +1 -2
- data/lib/net/ssh/verifiers/always.rb +6 -4
- data/lib/net/ssh/verifiers/never.rb +0 -2
- data/lib/net/ssh/version.rb +3 -3
- data/lib/net/ssh.rb +12 -8
- data/net-ssh-public_cert.pem +8 -8
- data/net-ssh.gemspec +9 -7
- data/support/ssh_tunnel_bug.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +55 -30
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -53
- data/Gemfile.noed25519.lock +0 -41
- data/README.rdoc +0 -194
- data/lib/net/ssh/ruby_compat.rb +0 -13
- data/support/arcfour_check.rb +0 -20
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -13,8 +13,8 @@ cert_chain:
|
|
13
13
|
- |
|
14
14
|
-----BEGIN CERTIFICATE-----
|
15
15
|
MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
|
16
|
-
|
17
|
-
|
16
|
+
c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMTA4MTAwODMyMzBaFw0yMjA4MTAw
|
17
|
+
ODMyMzBaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
|
18
18
|
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
|
19
19
|
wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
|
20
20
|
x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
|
@@ -24,14 +24,14 @@ cert_chain:
|
|
24
24
|
AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
|
25
25
|
M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
|
26
26
|
HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
ggEBABRChgo0Jo+iXSnTpODNongzZoU0sWqwx3/FQVo8nyAyr1qFuiqpSPb4bDbU
|
28
|
+
DsVnUn3t0X/gGA8qJhutlmfTpEQCjUeyj2x9rWpD3lvttlGWV6btQ0qN4Dfc2gsw
|
29
|
+
rCp9Jpful0HGWhiwfjWfsarqAdtLzIG0UC47IN7LGeCMRJIijOsXQhiZ915eNBEw
|
30
|
+
g9+WSSGHkMFt/7vi2pFkvXSC0+RF8ovvRWf4Zw2aYXtJ1GElgi4ZS/s6ZU0gmv20
|
31
|
+
i4SfC5m5UXIVZvOBYiMuZ/1B2m6R9xU41027zfOVwRFNtlVDiNfQRq6sDmz44At/
|
32
|
+
dv8pkxXDgySe41vzlRXFsgIgz5A=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2022-06-26 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bcrypt_pbkdf
|
@@ -61,20 +61,34 @@ dependencies:
|
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '1.2'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: x25519
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
64
78
|
- !ruby/object:Gem::Dependency
|
65
79
|
name: bundler
|
66
80
|
requirement: !ruby/object:Gem::Requirement
|
67
81
|
requirements:
|
68
|
-
- - "
|
82
|
+
- - ">="
|
69
83
|
- !ruby/object:Gem::Version
|
70
|
-
version: '1.
|
84
|
+
version: '1.17'
|
71
85
|
type: :development
|
72
86
|
prerelease: false
|
73
87
|
version_requirements: !ruby/object:Gem::Requirement
|
74
88
|
requirements:
|
75
|
-
- - "
|
89
|
+
- - ">="
|
76
90
|
- !ruby/object:Gem::Version
|
77
|
-
version: '1.
|
91
|
+
version: '1.17'
|
78
92
|
- !ruby/object:Gem::Dependency
|
79
93
|
name: minitest
|
80
94
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,16 +107,16 @@ dependencies:
|
|
93
107
|
name: mocha
|
94
108
|
requirement: !ruby/object:Gem::Requirement
|
95
109
|
requirements:
|
96
|
-
- - "
|
110
|
+
- - "~>"
|
97
111
|
- !ruby/object:Gem::Version
|
98
|
-
version: 1.2
|
112
|
+
version: 1.11.2
|
99
113
|
type: :development
|
100
114
|
prerelease: false
|
101
115
|
version_requirements: !ruby/object:Gem::Requirement
|
102
116
|
requirements:
|
103
|
-
- - "
|
117
|
+
- - "~>"
|
104
118
|
- !ruby/object:Gem::Version
|
105
|
-
version: 1.2
|
119
|
+
version: 1.11.2
|
106
120
|
- !ruby/object:Gem::Dependency
|
107
121
|
name: rake
|
108
122
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,14 +137,14 @@ dependencies:
|
|
123
137
|
requirements:
|
124
138
|
- - "~>"
|
125
139
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
140
|
+
version: 1.28.0
|
127
141
|
type: :development
|
128
142
|
prerelease: false
|
129
143
|
version_requirements: !ruby/object:Gem::Requirement
|
130
144
|
requirements:
|
131
145
|
- - "~>"
|
132
146
|
- !ruby/object:Gem::Version
|
133
|
-
version:
|
147
|
+
version: 1.28.0
|
134
148
|
description: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It
|
135
149
|
allows you to write programs that invoke and interact with processes on remote servers,
|
136
150
|
via SSH2.'
|
@@ -140,23 +154,29 @@ executables: []
|
|
140
154
|
extensions: []
|
141
155
|
extra_rdoc_files:
|
142
156
|
- LICENSE.txt
|
143
|
-
- README.
|
157
|
+
- README.md
|
144
158
|
files:
|
159
|
+
- ".dockerignore"
|
160
|
+
- ".github/config/rubocop_linter_action.yml"
|
161
|
+
- ".github/workflows/ci-with-docker.yml"
|
162
|
+
- ".github/workflows/ci.yml"
|
163
|
+
- ".github/workflows/rubocop.yml"
|
145
164
|
- ".gitignore"
|
146
165
|
- ".rubocop.yml"
|
147
166
|
- ".rubocop_todo.yml"
|
148
|
-
- ".travis.yml"
|
149
167
|
- CHANGES.txt
|
168
|
+
- Dockerfile
|
169
|
+
- Dockerfile.openssl3
|
150
170
|
- Gemfile
|
151
171
|
- Gemfile.noed25519
|
152
|
-
- Gemfile.noed25519.lock
|
153
172
|
- ISSUE_TEMPLATE.md
|
154
173
|
- LICENSE.txt
|
155
174
|
- Manifest
|
156
|
-
- README.
|
175
|
+
- README.md
|
157
176
|
- Rakefile
|
158
177
|
- THANKS.txt
|
159
178
|
- appveyor.yml
|
179
|
+
- docker-compose.yml
|
160
180
|
- lib/net/ssh.rb
|
161
181
|
- lib/net/ssh/authentication/agent.rb
|
162
182
|
- lib/net/ssh/authentication/certificate.rb
|
@@ -195,7 +215,6 @@ files:
|
|
195
215
|
- lib/net/ssh/proxy/jump.rb
|
196
216
|
- lib/net/ssh/proxy/socks4.rb
|
197
217
|
- lib/net/ssh/proxy/socks5.rb
|
198
|
-
- lib/net/ssh/ruby_compat.rb
|
199
218
|
- lib/net/ssh/service/forward.rb
|
200
219
|
- lib/net/ssh/test.rb
|
201
220
|
- lib/net/ssh/test/channel.rb
|
@@ -220,11 +239,18 @@ files:
|
|
220
239
|
- lib/net/ssh/transport/hmac/sha1_96.rb
|
221
240
|
- lib/net/ssh/transport/hmac/sha2_256.rb
|
222
241
|
- lib/net/ssh/transport/hmac/sha2_256_96.rb
|
242
|
+
- lib/net/ssh/transport/hmac/sha2_256_etm.rb
|
223
243
|
- lib/net/ssh/transport/hmac/sha2_512.rb
|
224
244
|
- lib/net/ssh/transport/hmac/sha2_512_96.rb
|
245
|
+
- lib/net/ssh/transport/hmac/sha2_512_etm.rb
|
225
246
|
- lib/net/ssh/transport/identity_cipher.rb
|
226
247
|
- lib/net/ssh/transport/kex.rb
|
248
|
+
- lib/net/ssh/transport/kex/abstract.rb
|
249
|
+
- lib/net/ssh/transport/kex/abstract5656.rb
|
250
|
+
- lib/net/ssh/transport/kex/curve25519_sha256.rb
|
251
|
+
- lib/net/ssh/transport/kex/curve25519_sha256_loader.rb
|
227
252
|
- lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
|
253
|
+
- lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb
|
228
254
|
- lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
|
229
255
|
- lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
|
230
256
|
- lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb
|
@@ -244,12 +270,12 @@ files:
|
|
244
270
|
- lib/net/ssh/version.rb
|
245
271
|
- net-ssh-public_cert.pem
|
246
272
|
- net-ssh.gemspec
|
247
|
-
- support/arcfour_check.rb
|
248
273
|
- support/ssh_tunnel_bug.rb
|
249
274
|
homepage: https://github.com/net-ssh/net-ssh
|
250
275
|
licenses:
|
251
276
|
- MIT
|
252
|
-
metadata:
|
277
|
+
metadata:
|
278
|
+
changelog_uri: https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt
|
253
279
|
post_install_message:
|
254
280
|
rdoc_options: []
|
255
281
|
require_paths:
|
@@ -258,15 +284,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
284
|
requirements:
|
259
285
|
- - ">="
|
260
286
|
- !ruby/object:Gem::Version
|
261
|
-
version: 2.
|
287
|
+
version: '2.6'
|
262
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
289
|
requirements:
|
264
290
|
- - ">="
|
265
291
|
- !ruby/object:Gem::Version
|
266
292
|
version: '0'
|
267
293
|
requirements: []
|
268
|
-
|
269
|
-
rubygems_version: 2.6.8
|
294
|
+
rubygems_version: 3.1.6
|
270
295
|
signing_key:
|
271
296
|
specification_version: 4
|
272
297
|
summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
|
metadata.gz.sig
CHANGED
Binary file
|
data/.travis.yml
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: true
|
3
|
-
dist: trusty
|
4
|
-
|
5
|
-
addon:
|
6
|
-
hosts:
|
7
|
-
gateway.netssh
|
8
|
-
|
9
|
-
rvm:
|
10
|
-
- 2.2.10
|
11
|
-
- 2.3.7
|
12
|
-
- 2.4.5
|
13
|
-
- 2.5.3
|
14
|
-
- 2.6.0-rc2
|
15
|
-
- jruby-9.2.5.0
|
16
|
-
- rbx-3.107
|
17
|
-
- ruby-head
|
18
|
-
env:
|
19
|
-
NET_SSH_RUN_INTEGRATION_TESTS=1
|
20
|
-
|
21
|
-
matrix:
|
22
|
-
exclude:
|
23
|
-
- rvm: rbx-3.107
|
24
|
-
- rvm: jruby-9.2.5.0
|
25
|
-
include:
|
26
|
-
- rvm: rbx-3.107
|
27
|
-
env: NET_SSH_RUN_INTEGRATION_TESTS=
|
28
|
-
- rvm: jruby-9.2.5.0
|
29
|
-
env: JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -Xcext.enabled=false -J-Xss2m -Xcompile.invokedynamic=false' NET_SSH_RUN_INTEGRATION_TESTS=
|
30
|
-
fast_finish: true
|
31
|
-
allow_failures:
|
32
|
-
- rvm: rbx-3.107
|
33
|
-
- rvm: jruby-9.2.5.0
|
34
|
-
- rvm: ruby-head
|
35
|
-
|
36
|
-
install:
|
37
|
-
- export JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -Xcext.enabled=false -J-Xss2m -Xcompile.invokedynamic=false'
|
38
|
-
- sudo pip install ansible urllib3 pyOpenSSL ndg-httpsclient pyasn1
|
39
|
-
- gem install bundler -v "= 1.16"
|
40
|
-
- gem list bundler
|
41
|
-
- bundle _1.16_ install
|
42
|
-
- bundle _1.16_ -v
|
43
|
-
- BUNDLE_GEMFILE=./Gemfile.noed25519 bundle _1.16_ install
|
44
|
-
- sudo ansible-galaxy install rvm.ruby
|
45
|
-
- sudo chown -R travis:travis /home/travis/.ansible
|
46
|
-
- ansible-playbook ./test/integration/playbook.yml -i "localhost," --become -c local -e 'no_rvm=true' -e 'myuser=travis' -e 'mygroup=travis' -e 'homedir=/home/travis'
|
47
|
-
|
48
|
-
script:
|
49
|
-
- ssh -V
|
50
|
-
- bundle _1.16_ exec rake test
|
51
|
-
- BUNDLE_GEMFILE=./Gemfile.noed25519 bundle _1.16_ exec rake test
|
52
|
-
- bundle _1.16_ exec rake test_test
|
53
|
-
- bundle _1.16_ exec rubocop
|
data/Gemfile.noed25519.lock
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
net-ssh (4.2.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
ast (2.3.0)
|
10
|
-
metaclass (0.0.4)
|
11
|
-
minitest (5.10.3)
|
12
|
-
mocha (1.3.0)
|
13
|
-
metaclass (~> 0.0.1)
|
14
|
-
parser (2.4.0.2)
|
15
|
-
ast (~> 2.3)
|
16
|
-
powerpack (0.1.1)
|
17
|
-
rainbow (2.2.2)
|
18
|
-
rake
|
19
|
-
rake (12.3.0)
|
20
|
-
rubocop (0.47.1)
|
21
|
-
parser (>= 2.3.3.1, < 3.0)
|
22
|
-
powerpack (~> 0.1)
|
23
|
-
rainbow (>= 1.99.1, < 3.0)
|
24
|
-
ruby-progressbar (~> 1.7)
|
25
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
26
|
-
ruby-progressbar (1.9.0)
|
27
|
-
unicode-display_width (1.3.0)
|
28
|
-
|
29
|
-
PLATFORMS
|
30
|
-
ruby
|
31
|
-
|
32
|
-
DEPENDENCIES
|
33
|
-
bundler (~> 1.11)
|
34
|
-
minitest (~> 5.10)
|
35
|
-
mocha (>= 1.2.1)
|
36
|
-
net-ssh!
|
37
|
-
rake (~> 12.0)
|
38
|
-
rubocop (~> 0.47.0)
|
39
|
-
|
40
|
-
BUNDLED WITH
|
41
|
-
1.14.6
|
data/README.rdoc
DELETED
@@ -1,194 +0,0 @@
|
|
1
|
-
{<img src="https://badge.fury.io/rb/net-ssh.svg" alt="Gem Version" />}[https://badge.fury.io/rb/net-ssh]
|
2
|
-
{<img src="https://badges.gitter.im/net-ssh/net-ssh.svg" alt="Join the chat at https://gitter.im/net-ssh/net-ssh">}[https://gitter.im/net-ssh/net-ssh?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge]
|
3
|
-
{<img src="https://travis-ci.org/net-ssh/net-ssh.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/net-ssh/net-ssh]
|
4
|
-
{<img src="https://codecov.io/gh/net-ssh/net-ssh/branch/master/graph/badge.svg" alt="Coverage status" />}[https://codecov.io/gh/net-ssh/net-ssh]
|
5
|
-
{<img src="https://opencollective.com/net-ssh/backers/badge.svg" alt="Backers on Open Collective" />}[#backers]
|
6
|
-
{<img src="https://opencollective.com/net-ssh/sponsors/badge.svg" alt="Sponsors on Open Collective" />}[#sponsors]
|
7
|
-
|
8
|
-
|
9
|
-
= Net::SSH 5.x
|
10
|
-
|
11
|
-
* Docs: http://net-ssh.github.com/net-ssh
|
12
|
-
* Issues: https://github.com/net-ssh/net-ssh/issues
|
13
|
-
* Codes: https://github.com/net-ssh/net-ssh
|
14
|
-
* Email: net-ssh@solutious.com
|
15
|
-
|
16
|
-
<em>As of v2.6.4, all gem releases are signed. See INSTALL.</em>
|
17
|
-
|
18
|
-
== DESCRIPTION:
|
19
|
-
|
20
|
-
Net::SSH is a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2.
|
21
|
-
|
22
|
-
== FEATURES:
|
23
|
-
|
24
|
-
* Execute processes on remote servers and capture their output
|
25
|
-
* Run multiple processes in parallel over a single SSH connection
|
26
|
-
* Support for SSH subsystems
|
27
|
-
* Forward local and remote ports via an SSH connection
|
28
|
-
|
29
|
-
== SYNOPSIS:
|
30
|
-
|
31
|
-
In a nutshell:
|
32
|
-
|
33
|
-
require 'net/ssh'
|
34
|
-
|
35
|
-
Net::SSH.start('host', 'user', password: "password") do |ssh|
|
36
|
-
# capture all stderr and stdout output from a remote process
|
37
|
-
output = ssh.exec!("hostname")
|
38
|
-
puts output
|
39
|
-
|
40
|
-
# capture only stdout matching a particular pattern
|
41
|
-
stdout = ""
|
42
|
-
ssh.exec!("ls -l /home/jamis") do |channel, stream, data|
|
43
|
-
stdout << data if stream == :stdout
|
44
|
-
end
|
45
|
-
puts stdout
|
46
|
-
|
47
|
-
# run multiple processes in parallel to completion
|
48
|
-
ssh.exec "sed ..."
|
49
|
-
ssh.exec "awk ..."
|
50
|
-
ssh.exec "rm -rf ..."
|
51
|
-
ssh.loop
|
52
|
-
|
53
|
-
# open a new channel and configure a minimal set of callbacks, then run
|
54
|
-
# the event loop until the channel finishes (closes)
|
55
|
-
channel = ssh.open_channel do |ch|
|
56
|
-
ch.exec "/usr/local/bin/ruby /path/to/file.rb" do |ch, success|
|
57
|
-
raise "could not execute command" unless success
|
58
|
-
|
59
|
-
# "on_data" is called when the process writes something to stdout
|
60
|
-
ch.on_data do |c, data|
|
61
|
-
$stdout.print data
|
62
|
-
end
|
63
|
-
|
64
|
-
# "on_extended_data" is called when the process writes something to stderr
|
65
|
-
ch.on_extended_data do |c, type, data|
|
66
|
-
$stderr.print data
|
67
|
-
end
|
68
|
-
|
69
|
-
ch.on_close { puts "done!" }
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
channel.wait
|
74
|
-
|
75
|
-
# forward connections on local port 1234 to port 80 of www.capify.org
|
76
|
-
ssh.forward.local(1234, "www.capify.org", 80)
|
77
|
-
ssh.loop { true }
|
78
|
-
end
|
79
|
-
|
80
|
-
See Net::SSH for more documentation, and links to further information.
|
81
|
-
|
82
|
-
== REQUIREMENTS:
|
83
|
-
|
84
|
-
The only requirement you might be missing is the OpenSSL bindings for Ruby. These are built by default on most platforms, but you can verify that they're built and installed on your system by running the following command line:
|
85
|
-
|
86
|
-
ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
|
87
|
-
|
88
|
-
If that spits out something like "OpenSSL 0.9.8g 19 Oct 2007", then you're set. If you get an error, then you'll need to see about rebuilding ruby with OpenSSL support, or (if your platform supports it) installing the OpenSSL bindings separately.
|
89
|
-
|
90
|
-
Lastly, if you want to run the tests or use any of the Rake tasks, you'll need Mocha and other dependencies listed in Gemfile
|
91
|
-
|
92
|
-
|
93
|
-
== INSTALL:
|
94
|
-
|
95
|
-
* gem install net-ssh (might need sudo privileges)
|
96
|
-
|
97
|
-
NOTE: If you are running on jruby on windows you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies).
|
98
|
-
|
99
|
-
However, in order to be sure the code you're installing hasn't been tampered with, it's recommended that you verify the signature[http://docs.rubygems.org/read/chapter/21]. To do this, you need to add my public key as a trusted certificate (you only need to do this once):
|
100
|
-
|
101
|
-
# Add the public key as a trusted certificate
|
102
|
-
# (You only need to do this once)
|
103
|
-
$ curl -O https://raw.githubusercontent.com/net-ssh/net-ssh/master/net-ssh-public_cert.pem
|
104
|
-
$ gem cert --add net-ssh-public_cert.pem
|
105
|
-
|
106
|
-
Then, when install the gem, do so with high security:
|
107
|
-
|
108
|
-
$ gem install net-ssh -P HighSecurity
|
109
|
-
|
110
|
-
If you don't add the public key, you'll see an error like "Couldn't verify data signature". If you're still having trouble let me know and I'll give you a hand.
|
111
|
-
|
112
|
-
For ed25519 public key auth support your bundle file should contain ```ed25519```, ```bcrypt_pbkdf``` dependencies.
|
113
|
-
|
114
|
-
== RUBY SUPPORT
|
115
|
-
|
116
|
-
* Ruby 1.8.x is supported up until the net-ssh 2.5.1 release.
|
117
|
-
* Ruby 1.9.x is supported up until the net-ssh 2.9.x release.
|
118
|
-
* See {net-ssh.gemspec}[https://github.com/net-ssh/net-ssh/blob/master/net-ssh.gemspec] for current versions ruby requirements
|
119
|
-
|
120
|
-
== RUNNING TESTS
|
121
|
-
|
122
|
-
Run the test suite from the net-ssh directory with the following command:
|
123
|
-
|
124
|
-
bundle exec rake test
|
125
|
-
|
126
|
-
Run a single test file like this:
|
127
|
-
|
128
|
-
ruby -Ilib -Itest test/transport/test_server_version.rb
|
129
|
-
|
130
|
-
To run integration tests see test/integration/README.txt
|
131
|
-
|
132
|
-
=== BUILDING GEM
|
133
|
-
|
134
|
-
rake build
|
135
|
-
|
136
|
-
=== GEM SIGNING (for maintainers)
|
137
|
-
|
138
|
-
If you have the net-ssh private signing key, you will be able to create signed release builds. Make sure the private key path matches the `signing_key` path set in `net-ssh.gemspec` and tell rake to sign the gem by setting the `NET_SSH_BUILDGEM_SIGNED` flag:
|
139
|
-
|
140
|
-
NET_SSH_BUILDGEM_SIGNED=true rake build
|
141
|
-
|
142
|
-
For time to time, the public certificate associated to the private key needs to be renewed. You can do this with the following command:
|
143
|
-
|
144
|
-
gem cert --build netssh@solutious.com --private-key path/2/net-ssh-private_key.pem
|
145
|
-
mv gem-public_cert.pem net-ssh-public_cert.pem
|
146
|
-
gem cert --add net-ssh-public_cert.pem
|
147
|
-
|
148
|
-
== CREDITS
|
149
|
-
|
150
|
-
=== Contributors
|
151
|
-
|
152
|
-
This project exists thanks to all the people who contribute.
|
153
|
-
|
154
|
-
{<img src="https://opencollective.com/net-ssh/contributors.svg?width=890&button=false" />}["graphs/contributors"]
|
155
|
-
|
156
|
-
|
157
|
-
=== Backers
|
158
|
-
|
159
|
-
Thank you to all our backers! 🙏 {Become a backer}[https://opencollective.com/net-ssh#backer)]
|
160
|
-
|
161
|
-
{<img src="https://opencollective.com/net-ssh/backers.svg?width=890”>}["https://opencollective.com/net-ssh#backers"]
|
162
|
-
|
163
|
-
=== Sponsors
|
164
|
-
|
165
|
-
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. {Become a sponsor}[https://opencollective.com/net-ssh#sponsor]
|
166
|
-
{<img src="https://opencollective.com/net-ssh/sponsor/0/avatar.svg" alt="Sponsor" />}[https://opencollective.com/net-ssh/sponsor/0/website]
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
== LICENSE:
|
172
|
-
|
173
|
-
(The MIT License)
|
174
|
-
|
175
|
-
Copyright (c) 2008 Jamis Buck
|
176
|
-
|
177
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
178
|
-
a copy of this software and associated documentation files (the
|
179
|
-
'Software'), to deal in the Software without restriction, including
|
180
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
181
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
182
|
-
permit persons to whom the Software is furnished to do so, subject to
|
183
|
-
the following conditions:
|
184
|
-
|
185
|
-
The above copyright notice and this permission notice shall be
|
186
|
-
included in all copies or substantial portions of the Software.
|
187
|
-
|
188
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
189
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
190
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
191
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
192
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
193
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
194
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/net/ssh/ruby_compat.rb
DELETED
data/support/arcfour_check.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'net/ssh'
|
3
|
-
|
4
|
-
# ARCFOUR CHECK
|
5
|
-
#
|
6
|
-
# Usage:
|
7
|
-
# $ ruby support/arcfour_check.rb
|
8
|
-
#
|
9
|
-
# Expected Output:
|
10
|
-
# arcfour128: [16, 8] OpenSSL::Cipher::Cipher
|
11
|
-
# arcfour256: [32, 8] OpenSSL::Cipher::Cipher
|
12
|
-
# arcfour512: [64, 8] OpenSSL::Cipher::Cipher
|
13
|
-
|
14
|
-
[['arcfour128', 16], ['arcfour256', 32], ['arcfour512', 64]].each do |cipher|
|
15
|
-
print "#{cipher[0]}: "
|
16
|
-
a = Net::SSH::Transport::CipherFactory.get_lengths(cipher[0])
|
17
|
-
b = Net::SSH::Transport::CipherFactory.get(cipher[0], key: ([].fill('x', 0, cipher[1]).join))
|
18
|
-
puts "#{a} #{b.class}"
|
19
|
-
end
|
20
|
-
|