net-ssh 3.2.0 → 7.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data/.dockerignore +6 -0
  4. data/.github/FUNDING.yml +1 -0
  5. data/.github/config/rubocop_linter_action.yml +4 -0
  6. data/.github/workflows/ci-with-docker.yml +44 -0
  7. data/.github/workflows/ci.yml +93 -0
  8. data/.github/workflows/rubocop.yml +16 -0
  9. data/.gitignore +13 -0
  10. data/.rubocop.yml +22 -0
  11. data/.rubocop_todo.yml +1081 -0
  12. data/CHANGES.txt +237 -7
  13. data/DEVELOPMENT.md +23 -0
  14. data/Dockerfile +27 -0
  15. data/Dockerfile.openssl3 +17 -0
  16. data/Gemfile +13 -0
  17. data/Gemfile.noed25519 +12 -0
  18. data/Gemfile.norbnacl +12 -0
  19. data/ISSUE_TEMPLATE.md +30 -0
  20. data/Manifest +4 -5
  21. data/README.md +298 -0
  22. data/Rakefile +125 -74
  23. data/SECURITY.md +4 -0
  24. data/appveyor.yml +58 -0
  25. data/docker-compose.yml +23 -0
  26. data/lib/net/ssh/authentication/agent.rb +279 -18
  27. data/lib/net/ssh/authentication/certificate.rb +183 -0
  28. data/lib/net/ssh/authentication/constants.rb +17 -15
  29. data/lib/net/ssh/authentication/ed25519.rb +186 -0
  30. data/lib/net/ssh/authentication/ed25519_loader.rb +31 -0
  31. data/lib/net/ssh/authentication/key_manager.rb +86 -39
  32. data/lib/net/ssh/authentication/methods/abstract.rb +67 -48
  33. data/lib/net/ssh/authentication/methods/hostbased.rb +34 -37
  34. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +13 -13
  35. data/lib/net/ssh/authentication/methods/none.rb +16 -19
  36. data/lib/net/ssh/authentication/methods/password.rb +27 -17
  37. data/lib/net/ssh/authentication/methods/publickey.rb +96 -55
  38. data/lib/net/ssh/authentication/pageant.rb +471 -367
  39. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +43 -0
  40. data/lib/net/ssh/authentication/session.rb +131 -121
  41. data/lib/net/ssh/buffer.rb +399 -300
  42. data/lib/net/ssh/buffered_io.rb +154 -150
  43. data/lib/net/ssh/config.rb +308 -185
  44. data/lib/net/ssh/connection/channel.rb +635 -613
  45. data/lib/net/ssh/connection/constants.rb +29 -29
  46. data/lib/net/ssh/connection/event_loop.rb +123 -0
  47. data/lib/net/ssh/connection/keepalive.rb +55 -51
  48. data/lib/net/ssh/connection/session.rb +620 -551
  49. data/lib/net/ssh/connection/term.rb +125 -123
  50. data/lib/net/ssh/errors.rb +101 -99
  51. data/lib/net/ssh/key_factory.rb +197 -105
  52. data/lib/net/ssh/known_hosts.rb +214 -127
  53. data/lib/net/ssh/loggable.rb +50 -49
  54. data/lib/net/ssh/packet.rb +83 -79
  55. data/lib/net/ssh/prompt.rb +50 -81
  56. data/lib/net/ssh/proxy/command.rb +105 -90
  57. data/lib/net/ssh/proxy/errors.rb +12 -10
  58. data/lib/net/ssh/proxy/http.rb +82 -79
  59. data/lib/net/ssh/proxy/https.rb +50 -0
  60. data/lib/net/ssh/proxy/jump.rb +54 -0
  61. data/lib/net/ssh/proxy/socks4.rb +2 -6
  62. data/lib/net/ssh/proxy/socks5.rb +14 -17
  63. data/lib/net/ssh/service/forward.rb +370 -317
  64. data/lib/net/ssh/test/channel.rb +145 -136
  65. data/lib/net/ssh/test/extensions.rb +131 -110
  66. data/lib/net/ssh/test/kex.rb +34 -32
  67. data/lib/net/ssh/test/local_packet.rb +46 -44
  68. data/lib/net/ssh/test/packet.rb +89 -70
  69. data/lib/net/ssh/test/remote_packet.rb +32 -30
  70. data/lib/net/ssh/test/script.rb +156 -142
  71. data/lib/net/ssh/test/socket.rb +49 -48
  72. data/lib/net/ssh/test.rb +82 -77
  73. data/lib/net/ssh/transport/algorithms.rb +462 -359
  74. data/lib/net/ssh/transport/chacha20_poly1305_cipher.rb +117 -0
  75. data/lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb +17 -0
  76. data/lib/net/ssh/transport/cipher_factory.rb +122 -99
  77. data/lib/net/ssh/transport/constants.rb +32 -24
  78. data/lib/net/ssh/transport/ctr.rb +42 -22
  79. data/lib/net/ssh/transport/hmac/abstract.rb +81 -63
  80. data/lib/net/ssh/transport/hmac/md5.rb +0 -2
  81. data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
  82. data/lib/net/ssh/transport/hmac/none.rb +0 -2
  83. data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
  84. data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
  85. data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
  86. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  87. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  88. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  89. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  90. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  91. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  92. data/lib/net/ssh/transport/hmac.rb +14 -12
  93. data/lib/net/ssh/transport/identity_cipher.rb +54 -44
  94. data/lib/net/ssh/transport/kex/abstract.rb +130 -0
  95. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  96. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +39 -0
  97. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  98. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +33 -40
  99. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
  100. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +119 -213
  101. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +53 -61
  102. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  103. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +36 -90
  104. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +18 -10
  105. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +18 -10
  106. data/lib/net/ssh/transport/kex.rb +15 -12
  107. data/lib/net/ssh/transport/key_expander.rb +24 -20
  108. data/lib/net/ssh/transport/openssl.rb +161 -124
  109. data/lib/net/ssh/transport/openssl_cipher_extensions.rb +8 -0
  110. data/lib/net/ssh/transport/packet_stream.rb +246 -185
  111. data/lib/net/ssh/transport/server_version.rb +55 -56
  112. data/lib/net/ssh/transport/session.rb +306 -255
  113. data/lib/net/ssh/transport/state.rb +178 -176
  114. data/lib/net/ssh/verifiers/accept_new.rb +33 -0
  115. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +33 -0
  116. data/lib/net/ssh/verifiers/always.rb +58 -0
  117. data/lib/net/ssh/verifiers/never.rb +19 -0
  118. data/lib/net/ssh/version.rb +55 -53
  119. data/lib/net/ssh.rb +111 -47
  120. data/net-ssh-public_cert.pem +18 -18
  121. data/net-ssh.gemspec +38 -205
  122. data/support/ssh_tunnel_bug.rb +5 -5
  123. data.tar.gz.sig +0 -0
  124. metadata +173 -118
  125. metadata.gz.sig +0 -0
  126. data/.travis.yml +0 -18
  127. data/README.rdoc +0 -182
  128. data/lib/net/ssh/authentication/agent/java_pageant.rb +0 -85
  129. data/lib/net/ssh/authentication/agent/socket.rb +0 -178
  130. data/lib/net/ssh/ruby_compat.rb +0 -46
  131. data/lib/net/ssh/verifiers/lenient.rb +0 -30
  132. data/lib/net/ssh/verifiers/null.rb +0 -12
  133. data/lib/net/ssh/verifiers/secure.rb +0 -52
  134. data/lib/net/ssh/verifiers/strict.rb +0 -24
  135. data/setup.rb +0 -1585
  136. data/support/arcfour_check.rb +0 -20
  137. data/test/README.txt +0 -18
  138. data/test/authentication/methods/common.rb +0 -28
  139. data/test/authentication/methods/test_abstract.rb +0 -51
  140. data/test/authentication/methods/test_hostbased.rb +0 -114
  141. data/test/authentication/methods/test_keyboard_interactive.rb +0 -121
  142. data/test/authentication/methods/test_none.rb +0 -41
  143. data/test/authentication/methods/test_password.rb +0 -95
  144. data/test/authentication/methods/test_publickey.rb +0 -148
  145. data/test/authentication/test_agent.rb +0 -232
  146. data/test/authentication/test_key_manager.rb +0 -240
  147. data/test/authentication/test_session.rb +0 -107
  148. data/test/common.rb +0 -125
  149. data/test/configs/auth_off +0 -5
  150. data/test/configs/auth_on +0 -4
  151. data/test/configs/empty +0 -0
  152. data/test/configs/eqsign +0 -3
  153. data/test/configs/exact_match +0 -8
  154. data/test/configs/host_plus +0 -10
  155. data/test/configs/multihost +0 -4
  156. data/test/configs/negative_match +0 -6
  157. data/test/configs/nohost +0 -19
  158. data/test/configs/numeric_host +0 -4
  159. data/test/configs/proxy_remote_user +0 -2
  160. data/test/configs/send_env +0 -2
  161. data/test/configs/substitutes +0 -8
  162. data/test/configs/wild_cards +0 -14
  163. data/test/connection/test_channel.rb +0 -487
  164. data/test/connection/test_session.rb +0 -564
  165. data/test/integration/README.txt +0 -17
  166. data/test/integration/Vagrantfile +0 -12
  167. data/test/integration/common.rb +0 -63
  168. data/test/integration/playbook.yml +0 -56
  169. data/test/integration/test_forward.rb +0 -637
  170. data/test/integration/test_id_rsa_keys.rb +0 -96
  171. data/test/integration/test_proxy.rb +0 -93
  172. data/test/known_hosts/github +0 -1
  173. data/test/known_hosts/github_hash +0 -1
  174. data/test/manual/test_pageant.rb +0 -37
  175. data/test/start/test_connection.rb +0 -53
  176. data/test/start/test_options.rb +0 -57
  177. data/test/start/test_transport.rb +0 -28
  178. data/test/start/test_user_nil.rb +0 -27
  179. data/test/test_all.rb +0 -12
  180. data/test/test_buffer.rb +0 -433
  181. data/test/test_buffered_io.rb +0 -63
  182. data/test/test_config.rb +0 -268
  183. data/test/test_key_factory.rb +0 -191
  184. data/test/test_known_hosts.rb +0 -66
  185. data/test/transport/hmac/test_md5.rb +0 -41
  186. data/test/transport/hmac/test_md5_96.rb +0 -27
  187. data/test/transport/hmac/test_none.rb +0 -34
  188. data/test/transport/hmac/test_ripemd160.rb +0 -36
  189. data/test/transport/hmac/test_sha1.rb +0 -36
  190. data/test/transport/hmac/test_sha1_96.rb +0 -27
  191. data/test/transport/hmac/test_sha2_256.rb +0 -37
  192. data/test/transport/hmac/test_sha2_256_96.rb +0 -27
  193. data/test/transport/hmac/test_sha2_512.rb +0 -37
  194. data/test/transport/hmac/test_sha2_512_96.rb +0 -27
  195. data/test/transport/kex/test_diffie_hellman_group14_sha1.rb +0 -13
  196. data/test/transport/kex/test_diffie_hellman_group1_sha1.rb +0 -150
  197. data/test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb +0 -96
  198. data/test/transport/kex/test_diffie_hellman_group_exchange_sha256.rb +0 -19
  199. data/test/transport/kex/test_ecdh_sha2_nistp256.rb +0 -161
  200. data/test/transport/kex/test_ecdh_sha2_nistp384.rb +0 -38
  201. data/test/transport/kex/test_ecdh_sha2_nistp521.rb +0 -38
  202. data/test/transport/test_algorithms.rb +0 -328
  203. data/test/transport/test_cipher_factory.rb +0 -443
  204. data/test/transport/test_hmac.rb +0 -34
  205. data/test/transport/test_identity_cipher.rb +0 -40
  206. data/test/transport/test_packet_stream.rb +0 -1762
  207. data/test/transport/test_server_version.rb +0 -74
  208. data/test/transport/test_session.rb +0 -331
  209. data/test/transport/test_state.rb +0 -181
  210. data/test/verifiers/test_secure.rb +0 -40
metadata CHANGED
@@ -1,40 +1,68 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 7.2.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
8
8
  - Delano Mandelbaum
9
9
  - Miklós Fazekas
10
10
  autorequire:
11
- bindir: bin
11
+ bindir: exe
12
12
  cert_chain:
13
13
  - |
14
14
  -----BEGIN CERTIFICATE-----
15
- MIIDODCCAiCgAwIBAgIBADANBgkqhkiG9w0BAQUFADBCMRAwDgYDVQQDDAduZXQt
16
- c3NoMRkwFwYKCZImiZ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RRXex2ibCOyY7pB5ris6xDnPe1WdlyCfUf1Fb+Yqxpy6a8QmH
31
+ v84waVXQ2i5M7pJaHVBF7DxxeW/q8W3VCnsq8vmmvULSThD18QqYGaFDJeN8sTR4
32
+ 6tfjgZ6OvGSScvbCMHkCE9XjonE=
33
33
  -----END CERTIFICATE-----
34
- date: 2016-06-19 00:00:00.000000000 Z
34
+ date: 2023-07-14 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
- name: test-unit
37
+ name: bcrypt_pbkdf
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.0'
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.0'
50
+ - !ruby/object:Gem::Dependency
51
+ name: ed25519
52
+ requirement: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '1.2'
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.2'
64
+ - !ruby/object:Gem::Dependency
65
+ name: x25519
38
66
  requirement: !ruby/object:Gem::Requirement
39
67
  requirements:
40
68
  - - ">="
@@ -48,41 +76,131 @@ dependencies:
48
76
  - !ruby/object:Gem::Version
49
77
  version: '0'
50
78
  - !ruby/object:Gem::Dependency
51
- name: mocha
79
+ name: rbnacl
80
+ requirement: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '7.1'
85
+ type: :development
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '7.1'
92
+ - !ruby/object:Gem::Dependency
93
+ name: bundler
52
94
  requirement: !ruby/object:Gem::Requirement
53
95
  requirements:
54
96
  - - ">="
55
97
  - !ruby/object:Gem::Version
56
- version: '0'
98
+ version: '1.17'
57
99
  type: :development
58
100
  prerelease: false
59
101
  version_requirements: !ruby/object:Gem::Requirement
60
102
  requirements:
61
103
  - - ">="
62
104
  - !ruby/object:Gem::Version
63
- version: '0'
105
+ version: '1.17'
106
+ - !ruby/object:Gem::Dependency
107
+ name: minitest
108
+ requirement: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '5.10'
113
+ type: :development
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '5.10'
120
+ - !ruby/object:Gem::Dependency
121
+ name: mocha
122
+ requirement: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: 1.11.2
127
+ type: :development
128
+ prerelease: false
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: 1.11.2
134
+ - !ruby/object:Gem::Dependency
135
+ name: rake
136
+ requirement: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: '12.0'
141
+ type: :development
142
+ prerelease: false
143
+ version_requirements: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: '12.0'
148
+ - !ruby/object:Gem::Dependency
149
+ name: rubocop
150
+ requirement: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: 1.28.0
155
+ type: :development
156
+ prerelease: false
157
+ version_requirements: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: 1.28.0
64
162
  description: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It
65
163
  allows you to write programs that invoke and interact with processes on remote servers,
66
164
  via SSH2.'
67
- email: net-ssh@solutious.com
165
+ email:
166
+ - net-ssh@solutious.com
68
167
  executables: []
69
168
  extensions: []
70
169
  extra_rdoc_files:
71
170
  - LICENSE.txt
72
- - README.rdoc
171
+ - README.md
73
172
  files:
74
- - ".travis.yml"
173
+ - ".dockerignore"
174
+ - ".github/FUNDING.yml"
175
+ - ".github/config/rubocop_linter_action.yml"
176
+ - ".github/workflows/ci-with-docker.yml"
177
+ - ".github/workflows/ci.yml"
178
+ - ".github/workflows/rubocop.yml"
179
+ - ".gitignore"
180
+ - ".rubocop.yml"
181
+ - ".rubocop_todo.yml"
75
182
  - CHANGES.txt
183
+ - DEVELOPMENT.md
184
+ - Dockerfile
185
+ - Dockerfile.openssl3
186
+ - Gemfile
187
+ - Gemfile.noed25519
188
+ - Gemfile.norbnacl
189
+ - ISSUE_TEMPLATE.md
76
190
  - LICENSE.txt
77
191
  - Manifest
78
- - README.rdoc
192
+ - README.md
79
193
  - Rakefile
194
+ - SECURITY.md
80
195
  - THANKS.txt
196
+ - appveyor.yml
197
+ - docker-compose.yml
81
198
  - lib/net/ssh.rb
82
199
  - lib/net/ssh/authentication/agent.rb
83
- - lib/net/ssh/authentication/agent/java_pageant.rb
84
- - lib/net/ssh/authentication/agent/socket.rb
200
+ - lib/net/ssh/authentication/certificate.rb
85
201
  - lib/net/ssh/authentication/constants.rb
202
+ - lib/net/ssh/authentication/ed25519.rb
203
+ - lib/net/ssh/authentication/ed25519_loader.rb
86
204
  - lib/net/ssh/authentication/key_manager.rb
87
205
  - lib/net/ssh/authentication/methods/abstract.rb
88
206
  - lib/net/ssh/authentication/methods/hostbased.rb
@@ -91,12 +209,14 @@ files:
91
209
  - lib/net/ssh/authentication/methods/password.rb
92
210
  - lib/net/ssh/authentication/methods/publickey.rb
93
211
  - lib/net/ssh/authentication/pageant.rb
212
+ - lib/net/ssh/authentication/pub_key_fingerprint.rb
94
213
  - lib/net/ssh/authentication/session.rb
95
214
  - lib/net/ssh/buffer.rb
96
215
  - lib/net/ssh/buffered_io.rb
97
216
  - lib/net/ssh/config.rb
98
217
  - lib/net/ssh/connection/channel.rb
99
218
  - lib/net/ssh/connection/constants.rb
219
+ - lib/net/ssh/connection/event_loop.rb
100
220
  - lib/net/ssh/connection/keepalive.rb
101
221
  - lib/net/ssh/connection/session.rb
102
222
  - lib/net/ssh/connection/term.rb
@@ -109,9 +229,10 @@ files:
109
229
  - lib/net/ssh/proxy/command.rb
110
230
  - lib/net/ssh/proxy/errors.rb
111
231
  - lib/net/ssh/proxy/http.rb
232
+ - lib/net/ssh/proxy/https.rb
233
+ - lib/net/ssh/proxy/jump.rb
112
234
  - lib/net/ssh/proxy/socks4.rb
113
235
  - lib/net/ssh/proxy/socks5.rb
114
- - lib/net/ssh/ruby_compat.rb
115
236
  - lib/net/ssh/service/forward.rb
116
237
  - lib/net/ssh/test.rb
117
238
  - lib/net/ssh/test/channel.rb
@@ -123,6 +244,8 @@ files:
123
244
  - lib/net/ssh/test/script.rb
124
245
  - lib/net/ssh/test/socket.rb
125
246
  - lib/net/ssh/transport/algorithms.rb
247
+ - lib/net/ssh/transport/chacha20_poly1305_cipher.rb
248
+ - lib/net/ssh/transport/chacha20_poly1305_cipher_loader.rb
126
249
  - lib/net/ssh/transport/cipher_factory.rb
127
250
  - lib/net/ssh/transport/constants.rb
128
251
  - lib/net/ssh/transport/ctr.rb
@@ -136,11 +259,18 @@ files:
136
259
  - lib/net/ssh/transport/hmac/sha1_96.rb
137
260
  - lib/net/ssh/transport/hmac/sha2_256.rb
138
261
  - lib/net/ssh/transport/hmac/sha2_256_96.rb
262
+ - lib/net/ssh/transport/hmac/sha2_256_etm.rb
139
263
  - lib/net/ssh/transport/hmac/sha2_512.rb
140
264
  - lib/net/ssh/transport/hmac/sha2_512_96.rb
265
+ - lib/net/ssh/transport/hmac/sha2_512_etm.rb
141
266
  - lib/net/ssh/transport/identity_cipher.rb
142
267
  - lib/net/ssh/transport/kex.rb
268
+ - lib/net/ssh/transport/kex/abstract.rb
269
+ - lib/net/ssh/transport/kex/abstract5656.rb
270
+ - lib/net/ssh/transport/kex/curve25519_sha256.rb
271
+ - lib/net/ssh/transport/kex/curve25519_sha256_loader.rb
143
272
  - lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
273
+ - lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb
144
274
  - lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
145
275
  - lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
146
276
  - lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb
@@ -149,98 +279,24 @@ files:
149
279
  - lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb
150
280
  - lib/net/ssh/transport/key_expander.rb
151
281
  - lib/net/ssh/transport/openssl.rb
282
+ - lib/net/ssh/transport/openssl_cipher_extensions.rb
152
283
  - lib/net/ssh/transport/packet_stream.rb
153
284
  - lib/net/ssh/transport/server_version.rb
154
285
  - lib/net/ssh/transport/session.rb
155
286
  - lib/net/ssh/transport/state.rb
156
- - lib/net/ssh/verifiers/lenient.rb
157
- - lib/net/ssh/verifiers/null.rb
158
- - lib/net/ssh/verifiers/secure.rb
159
- - lib/net/ssh/verifiers/strict.rb
287
+ - lib/net/ssh/verifiers/accept_new.rb
288
+ - lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb
289
+ - lib/net/ssh/verifiers/always.rb
290
+ - lib/net/ssh/verifiers/never.rb
160
291
  - lib/net/ssh/version.rb
161
292
  - net-ssh-public_cert.pem
162
293
  - net-ssh.gemspec
163
- - setup.rb
164
- - support/arcfour_check.rb
165
294
  - support/ssh_tunnel_bug.rb
166
- - test/README.txt
167
- - test/authentication/methods/common.rb
168
- - test/authentication/methods/test_abstract.rb
169
- - test/authentication/methods/test_hostbased.rb
170
- - test/authentication/methods/test_keyboard_interactive.rb
171
- - test/authentication/methods/test_none.rb
172
- - test/authentication/methods/test_password.rb
173
- - test/authentication/methods/test_publickey.rb
174
- - test/authentication/test_agent.rb
175
- - test/authentication/test_key_manager.rb
176
- - test/authentication/test_session.rb
177
- - test/common.rb
178
- - test/configs/auth_off
179
- - test/configs/auth_on
180
- - test/configs/empty
181
- - test/configs/eqsign
182
- - test/configs/exact_match
183
- - test/configs/host_plus
184
- - test/configs/multihost
185
- - test/configs/negative_match
186
- - test/configs/nohost
187
- - test/configs/numeric_host
188
- - test/configs/proxy_remote_user
189
- - test/configs/send_env
190
- - test/configs/substitutes
191
- - test/configs/wild_cards
192
- - test/connection/test_channel.rb
193
- - test/connection/test_session.rb
194
- - test/integration/README.txt
195
- - test/integration/Vagrantfile
196
- - test/integration/common.rb
197
- - test/integration/playbook.yml
198
- - test/integration/test_forward.rb
199
- - test/integration/test_id_rsa_keys.rb
200
- - test/integration/test_proxy.rb
201
- - test/known_hosts/github
202
- - test/known_hosts/github_hash
203
- - test/manual/test_pageant.rb
204
- - test/start/test_connection.rb
205
- - test/start/test_options.rb
206
- - test/start/test_transport.rb
207
- - test/start/test_user_nil.rb
208
- - test/test_all.rb
209
- - test/test_buffer.rb
210
- - test/test_buffered_io.rb
211
- - test/test_config.rb
212
- - test/test_key_factory.rb
213
- - test/test_known_hosts.rb
214
- - test/transport/hmac/test_md5.rb
215
- - test/transport/hmac/test_md5_96.rb
216
- - test/transport/hmac/test_none.rb
217
- - test/transport/hmac/test_ripemd160.rb
218
- - test/transport/hmac/test_sha1.rb
219
- - test/transport/hmac/test_sha1_96.rb
220
- - test/transport/hmac/test_sha2_256.rb
221
- - test/transport/hmac/test_sha2_256_96.rb
222
- - test/transport/hmac/test_sha2_512.rb
223
- - test/transport/hmac/test_sha2_512_96.rb
224
- - test/transport/kex/test_diffie_hellman_group14_sha1.rb
225
- - test/transport/kex/test_diffie_hellman_group1_sha1.rb
226
- - test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb
227
- - test/transport/kex/test_diffie_hellman_group_exchange_sha256.rb
228
- - test/transport/kex/test_ecdh_sha2_nistp256.rb
229
- - test/transport/kex/test_ecdh_sha2_nistp384.rb
230
- - test/transport/kex/test_ecdh_sha2_nistp521.rb
231
- - test/transport/test_algorithms.rb
232
- - test/transport/test_cipher_factory.rb
233
- - test/transport/test_hmac.rb
234
- - test/transport/test_identity_cipher.rb
235
- - test/transport/test_packet_stream.rb
236
- - test/transport/test_server_version.rb
237
- - test/transport/test_session.rb
238
- - test/transport/test_state.rb
239
- - test/verifiers/test_secure.rb
240
295
  homepage: https://github.com/net-ssh/net-ssh
241
296
  licenses:
242
297
  - MIT
243
- metadata: {}
298
+ metadata:
299
+ changelog_uri: https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt
244
300
  post_install_message:
245
301
  rdoc_options: []
246
302
  require_paths:
@@ -249,15 +305,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
305
  requirements:
250
306
  - - ">="
251
307
  - !ruby/object:Gem::Version
252
- version: '2.0'
308
+ version: '2.6'
253
309
  required_rubygems_version: !ruby/object:Gem::Requirement
254
310
  requirements:
255
- - - ">="
311
+ - - ">"
256
312
  - !ruby/object:Gem::Version
257
- version: '0'
313
+ version: 1.3.1
258
314
  requirements: []
259
- rubyforge_project: net-ssh
260
- rubygems_version: 2.4.6
315
+ rubygems_version: 3.3.3
261
316
  signing_key:
262
317
  specification_version: 4
263
318
  summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
metadata.gz.sig CHANGED
Binary file
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- rvm:
4
- - 2.0.0
5
- - 2.1.0
6
- - 2.2.0
7
- - 2.3.0
8
- - jruby-head
9
- - jruby-19mode
10
- - rbx-2
11
-
12
- install: gem install test-unit mocha
13
-
14
- script: rake test
15
-
16
- matrix:
17
- allow_failures:
18
- - rvm: jruby-head
data/README.rdoc DELETED
@@ -1,182 +0,0 @@
1
- = Net::SSH 3.x
2
-
3
- <em><b>Please note: this project is in maintenance mode. It is not under active development but pull requests are very much welcome. Just be sure to include tests! -- delano</b></em>
4
-
5
-
6
- * Docs: http://net-ssh.github.com/net-ssh
7
- * Issues: https://github.com/net-ssh/net-ssh/issues
8
- * Codes: https://github.com/net-ssh/net-ssh
9
- * Email: net-ssh@solutious.com
10
-
11
-
12
- <em>As of v2.6.4, all gem releases are signed. See INSTALL.</em>
13
-
14
-
15
- == DESCRIPTION:
16
-
17
- 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.
18
-
19
- == FEATURES:
20
-
21
- * Execute processes on remote servers and capture their output
22
- * Run multiple processes in parallel over a single SSH connection
23
- * Support for SSH subsystems
24
- * Forward local and remote ports via an SSH connection
25
-
26
- == SYNOPSIS:
27
-
28
- In a nutshell:
29
-
30
- require 'net/ssh'
31
-
32
- Net::SSH.start('host', 'user', :password => "password") do |ssh|
33
- # capture all stderr and stdout output from a remote process
34
- output = ssh.exec!("hostname")
35
- puts output
36
-
37
- # capture only stdout matching a particular pattern
38
- stdout = ""
39
- ssh.exec!("ls -l /home/jamis") do |channel, stream, data|
40
- stdout << data if stream == :stdout
41
- end
42
- puts stdout
43
-
44
- # run multiple processes in parallel to completion
45
- ssh.exec "sed ..."
46
- ssh.exec "awk ..."
47
- ssh.exec "rm -rf ..."
48
- ssh.loop
49
-
50
- # open a new channel and configure a minimal set of callbacks, then run
51
- # the event loop until the channel finishes (closes)
52
- channel = ssh.open_channel do |ch|
53
- ch.exec "/usr/local/bin/ruby /path/to/file.rb" do |ch, success|
54
- raise "could not execute command" unless success
55
-
56
- # "on_data" is called when the process writes something to stdout
57
- ch.on_data do |c, data|
58
- $stdout.print data
59
- end
60
-
61
- # "on_extended_data" is called when the process writes something to stderr
62
- ch.on_extended_data do |c, type, data|
63
- $stderr.print data
64
- end
65
-
66
- ch.on_close { puts "done!" }
67
- end
68
- end
69
-
70
- channel.wait
71
-
72
- # forward connections on local port 1234 to port 80 of www.capify.org
73
- ssh.forward.local(1234, "www.capify.org", 80)
74
- ssh.loop { true }
75
- end
76
-
77
- See Net::SSH for more documentation, and links to further information.
78
-
79
- == REQUIREMENTS:
80
-
81
- 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:
82
-
83
- ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
84
-
85
- 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.
86
-
87
- Additionally: if you are going to be having Net::SSH prompt you for things like passwords or certificate passphrases, you'll want to have either the Highline (recommended) or Termios (unix systems only) gem installed, so that the passwords don't echo in clear text.
88
-
89
- Lastly, if you want to run the tests or use any of the Rake tasks, you'll need:
90
-
91
- * Echoe (for the Rakefile)
92
- * Mocha (for the tests)
93
-
94
-
95
- == INSTALL:
96
-
97
- * gem install net-ssh (might need sudo privileges)
98
-
99
- NOTE: If you are running on jruby you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies).
100
-
101
- 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):
102
-
103
- # Add the public key as a trusted certificate
104
- # (You only need to do this once)
105
- $ curl -O https://raw.githubusercontent.com/net-ssh/net-ssh/master/net-ssh-public_cert.pem
106
- $ gem cert --add net-ssh-public_cert.pem
107
-
108
- Then, when install the gem, do so with high security:
109
-
110
- $ gem install net-ssh -P HighSecurity
111
-
112
- 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.
113
-
114
- == RUBY 1.x 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
- * Current net-ssh releases require Ruby 2.0 or later.
119
-
120
- == RUNNING TESTS
121
-
122
- Run the test suite from the net-ssh directory with the following command:
123
-
124
- bash -c 'unset HOME && ruby -Ilib -Itest -rrubygems test/test_all.rb'
125
-
126
- Run a single test file like this:
127
-
128
- ruby -Ilib -Itest -rrubygems test/transport/test_server_version.rb
129
-
130
- To run integration tests see test/integration/README.txt
131
-
132
- === BUILDING GEM
133
-
134
- Since building the gem requires the private key if you want to build a .gem locally please use the NET_SSH_NOKEY=1 envirnoment variable:
135
-
136
- rake build NET_SSH_NOKEY=1
137
-
138
- === PORT FORWARDING TESTS
139
-
140
- ruby -Ilib -Itest -rrubygems test/manual/test_forward.rb
141
-
142
- test_forward.rb must be run separately from the test suite because
143
- it requires authorizing your public SSH keys on you localhost.
144
-
145
- If you already have keys you can do this:
146
-
147
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
148
-
149
- If you don't have keys see:
150
-
151
- http://kimmo.suominen.com/docs/ssh/#ssh-keygen
152
-
153
- You should now be able to login to your localhost with out
154
- bring prompted for a password:
155
-
156
- ssh localhost
157
-
158
-
159
- == LICENSE:
160
-
161
- (The MIT License)
162
-
163
- Copyright (c) 2008 Jamis Buck
164
-
165
- Permission is hereby granted, free of charge, to any person obtaining
166
- a copy of this software and associated documentation files (the
167
- 'Software'), to deal in the Software without restriction, including
168
- without limitation the rights to use, copy, modify, merge, publish,
169
- distribute, sublicense, and/or sell copies of the Software, and to
170
- permit persons to whom the Software is furnished to do so, subject to
171
- the following conditions:
172
-
173
- The above copyright notice and this permission notice shall be
174
- included in all copies or substantial portions of the Software.
175
-
176
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
177
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
178
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
179
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
180
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
181
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
182
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.