net-ssh 5.2.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +7 -4
  6. data/.rubocop_todo.yml +392 -379
  7. data/.travis.yml +16 -17
  8. data/CHANGES.txt +11 -0
  9. data/Manifest +0 -1
  10. data/README.md +286 -0
  11. data/Rakefile +1 -2
  12. data/appveyor.yml +4 -2
  13. data/lib/net/ssh.rb +7 -2
  14. data/lib/net/ssh/authentication/certificate.rb +10 -1
  15. data/lib/net/ssh/authentication/ed25519.rb +2 -1
  16. data/lib/net/ssh/authentication/ed25519_loader.rb +1 -1
  17. data/lib/net/ssh/authentication/key_manager.rb +34 -5
  18. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +3 -1
  19. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +0 -1
  20. data/lib/net/ssh/authentication/session.rb +9 -6
  21. data/lib/net/ssh/buffer.rb +1 -10
  22. data/lib/net/ssh/buffered_io.rb +0 -1
  23. data/lib/net/ssh/config.rb +51 -32
  24. data/lib/net/ssh/connection/channel.rb +17 -5
  25. data/lib/net/ssh/connection/event_loop.rb +0 -1
  26. data/lib/net/ssh/connection/session.rb +7 -4
  27. data/lib/net/ssh/key_factory.rb +6 -8
  28. data/lib/net/ssh/known_hosts.rb +27 -29
  29. data/lib/net/ssh/loggable.rb +2 -2
  30. data/lib/net/ssh/proxy/command.rb +0 -1
  31. data/lib/net/ssh/proxy/socks5.rb +0 -1
  32. data/lib/net/ssh/service/forward.rb +2 -1
  33. data/lib/net/ssh/test.rb +3 -2
  34. data/lib/net/ssh/transport/algorithms.rb +67 -42
  35. data/lib/net/ssh/transport/cipher_factory.rb +11 -27
  36. data/lib/net/ssh/transport/constants.rb +10 -6
  37. data/lib/net/ssh/transport/ctr.rb +1 -7
  38. data/lib/net/ssh/transport/hmac.rb +15 -13
  39. data/lib/net/ssh/transport/hmac/abstract.rb +16 -0
  40. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  41. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  42. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  43. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  44. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  45. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  46. data/lib/net/ssh/transport/kex.rb +14 -11
  47. data/lib/net/ssh/transport/kex/abstract.rb +123 -0
  48. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  49. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +38 -0
  50. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  51. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +1 -15
  52. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +9 -118
  53. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -6
  54. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  55. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +18 -79
  56. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
  57. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
  58. data/lib/net/ssh/transport/openssl.rb +104 -107
  59. data/lib/net/ssh/transport/packet_stream.rb +44 -11
  60. data/lib/net/ssh/transport/state.rb +1 -1
  61. data/lib/net/ssh/version.rb +2 -2
  62. data/net-ssh-public_cert.pem +8 -8
  63. data/net-ssh.gemspec +9 -7
  64. metadata +46 -29
  65. metadata.gz.sig +2 -3
  66. data/Gemfile.noed25519.lock +0 -41
  67. data/README.rdoc +0 -194
  68. data/lib/net/ssh/ruby_compat.rb +0 -13
  69. data/support/arcfour_check.rb +0 -20
@@ -1,7 +1,6 @@
1
1
  require 'net/ssh/buffered_io'
2
2
  require 'net/ssh/errors'
3
3
  require 'net/ssh/packet'
4
- require 'net/ssh/ruby_compat'
5
4
  require 'net/ssh/transport/cipher_factory'
6
5
  require 'net/ssh/transport/hmac'
7
6
  require 'net/ssh/transport/state'
@@ -130,7 +129,7 @@ module Net
130
129
  payload = client.compress(payload)
131
130
 
132
131
  # the length of the packet, minus the padding
133
- actual_length = 4 + payload.bytesize + 1
132
+ actual_length = (client.hmac.etm ? 0 : 4) + payload.bytesize + 1
134
133
 
135
134
  # compute the padding length
136
135
  padding_length = client.block_size - (actual_length % client.block_size)
@@ -146,11 +145,32 @@ module Net
146
145
 
147
146
  padding = Array.new(padding_length) { rand(256) }.pack("C*")
148
147
 
149
- unencrypted_data = [packet_length, padding_length, payload, padding].pack("NCA*A*")
150
- mac = client.hmac.digest([client.sequence_number, unencrypted_data].pack("NA*"))
148
+ if client.hmac.etm
149
+ debug { "using encrypt-then-mac" }
151
150
 
152
- encrypted_data = client.update_cipher(unencrypted_data) << client.final_cipher
153
- message = encrypted_data + mac
151
+ # Encrypt padding_length, payload, and padding. Take MAC
152
+ # from the unencrypted packet_lenght and the encrypted
153
+ # data.
154
+ length_data = [packet_length].pack("N")
155
+
156
+ unencrypted_data = [padding_length, payload, padding].pack("CA*A*")
157
+
158
+ encrypted_data = client.update_cipher(unencrypted_data) << client.final_cipher
159
+
160
+ mac_data = length_data + encrypted_data
161
+
162
+ mac = client.hmac.digest([client.sequence_number, mac_data].pack("NA*"))
163
+
164
+ message = mac_data + mac
165
+ else
166
+ unencrypted_data = [packet_length, padding_length, payload, padding].pack("NCA*A*")
167
+
168
+ mac = client.hmac.digest([client.sequence_number, unencrypted_data].pack("NA*"))
169
+
170
+ encrypted_data = client.update_cipher(unencrypted_data) << client.final_cipher
171
+
172
+ message = encrypted_data + mac
173
+ end
154
174
 
155
175
  debug { "queueing packet nr #{client.sequence_number} type #{payload.getbyte(0)} len #{packet_length}" }
156
176
  enqueue(message)
@@ -196,17 +216,25 @@ module Net
196
216
  # algorithms specified in the server state object, and returned as a
197
217
  # new Packet object.
198
218
  def poll_next_packet
219
+ aad_length = server.hmac.etm ? 4 : 0
220
+
199
221
  if @packet.nil?
200
222
  minimum = server.block_size < 4 ? 4 : server.block_size
201
223
  return nil if available < minimum
202
- data = read_available(minimum)
224
+ data = read_available(minimum + aad_length)
203
225
 
204
226
  # decipher it
205
- @packet = Net::SSH::Buffer.new(server.update_cipher(data))
206
- @packet_length = @packet.read_long
227
+ if server.hmac.etm
228
+ @packet_length = data.unpack("N").first
229
+ @mac_data = data
230
+ @packet = Net::SSH::Buffer.new(server.update_cipher(data[aad_length..-1]))
231
+ else
232
+ @packet = Net::SSH::Buffer.new(server.update_cipher(data))
233
+ @packet_length = @packet.read_long
234
+ end
207
235
  end
208
236
 
209
- need = @packet_length + 4 - server.block_size
237
+ need = @packet_length + 4 - aad_length - server.block_size
210
238
  raise Net::SSH::Exception, "padding error, need #{need} block #{server.block_size}" if need % server.block_size != 0
211
239
 
212
240
  return nil if available < need + server.hmac.mac_length
@@ -214,6 +242,7 @@ module Net
214
242
  if need > 0
215
243
  # read the remainder of the packet and decrypt it.
216
244
  data = read_available(need)
245
+ @mac_data += data if server.hmac.etm
217
246
  @packet.append(server.update_cipher(data))
218
247
  end
219
248
 
@@ -226,7 +255,11 @@ module Net
226
255
 
227
256
  payload = @packet.read(@packet_length - padding_length - 1)
228
257
 
229
- my_computed_hmac = server.hmac.digest([server.sequence_number, @packet.content].pack("NA*"))
258
+ my_computed_hmac = if server.hmac.etm
259
+ server.hmac.digest([server.sequence_number, @mac_data].pack("NA*"))
260
+ else
261
+ server.hmac.digest([server.sequence_number, @packet.content].pack("NA*"))
262
+ end
230
263
  raise Net::SSH::Exception, "corrupted hmac detected" if real_hmac != my_computed_hmac
231
264
 
232
265
  # try to decompress the payload, in case compression is active
@@ -141,7 +141,7 @@ module Net
141
141
 
142
142
  @max_packets ||= 1 << 31
143
143
 
144
- @block_size = cipher.name == "RC4" ? 8 : cipher.block_size
144
+ @block_size = cipher.block_size
145
145
 
146
146
  if max_blocks.nil?
147
147
  # cargo-culted from openssh. the idea is that "the 2^(blocksize*2)
@@ -46,10 +46,10 @@ module Net
46
46
  end
47
47
 
48
48
  # The major component of this version of the Net::SSH library
49
- MAJOR = 5
49
+ MAJOR = 6
50
50
 
51
51
  # The minor component of this version of the Net::SSH library
52
- MINOR = 2
52
+ MINOR = 0
53
53
 
54
54
  # The tiny component of this version of the Net::SSH library
55
55
  TINY = 0
@@ -1,7 +1,7 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
3
- c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0xOTAzMTEwOTQ1MzZaFw0yMDAzMTAw
4
- OTQ1MzZaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
3
+ c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMDA0MTEwNTQyMTZaFw0yMTA0MTEw
4
+ NTQyMTZaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
5
5
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
6
6
  wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
7
7
  x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
@@ -11,10 +11,10 @@ fBbmDnsMLAtAtauMOxORrbx3EOY7sHku/kSrMg3FXFay7jc6BkbbUij+MjJ/k82l
11
11
  AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
12
12
  M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
13
13
  HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
14
- ggEBAILNXrrFaLruwlBoTx3F7iL5wiRUT+cOMfdon25gzX8Tf87hi6rITnRgFfak
15
- w+C/rbrYOuEfUJMeZSU5ASxzrB4ohgJ5AFxuxGNkWEQJC4nICGn3ML8PmHzEV12z
16
- +nMm9AtBM16dJTdTKA2B6du0ZtTtbm4M3ULB7rhkUO2L2RbDyyiGQw85IBdaVdzr
17
- GmrxZPAOhBABOREsvJU1+3GIyJncqXmtrYUGUoLiIf/WO0mxPzYALZC/6ZYfu2UP
18
- +MqVFjDxsJA7cDfACke51RypSH1gZoPjzoW6w0sMRAzZT8hU1eGyqtNuBiSZ1UKv
19
- B/ztNLEP0OWhpj/NZ1fnGRvo/T0=
14
+ ggEBAJTylLYXo5AybI+tLq79+OXQ8/nbGZ7iydU1uTHQud1JZQ1MRV5dRDjeBmCT
15
+ lRxaEZT4NopEzuHO0sm3nVpSYtQwTaQyVKmnllNI3kc0f4H6i7dpPd7eUAQ3/O2I
16
+ eWjDJlzu0zwqTa+N6vzS8Y3ypDSGgb1gJKzluOv7viVUAthmuuJws7XQq/qMMaNw
17
+ 3163oCKuJvMW1w8kdUMQqvlLJkVKaxz9K64r2+a04Ok1cKloTB3OSowfAYFoRlqP
18
+ voajiJNS75Pw/2j13WnPB4Q6w7dHSb57E/VluBpVKmcQZN0dGdAkEIVty3v7kw9g
19
+ y++VpCpWM/PstIFv4ApZMf501UY=
20
20
  -----END CERTIFICATE-----
@@ -1,4 +1,3 @@
1
-
2
1
  require_relative 'lib/net/ssh/version'
3
2
 
4
3
  Gem::Specification.new do |spec|
@@ -16,11 +15,14 @@ Gem::Specification.new do |spec|
16
15
  spec.description = %q{Net::SSH: 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.}
17
16
  spec.homepage = "https://github.com/net-ssh/net-ssh"
18
17
  spec.license = "MIT"
19
- spec.required_ruby_version = Gem::Requirement.new(">= 2.2.6")
18
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3")
19
+ spec.metadata = {
20
+ "changelog_uri" => "https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt"
21
+ }
20
22
 
21
23
  spec.extra_rdoc_files = [
22
24
  "LICENSE.txt",
23
- "README.rdoc"
25
+ "README.md"
24
26
  ]
25
27
 
26
28
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -31,12 +33,12 @@ Gem::Specification.new do |spec|
31
33
  unless ENV['NET_SSH_NO_ED25519']
32
34
  spec.add_development_dependency("bcrypt_pbkdf", "~> 1.0") unless RUBY_PLATFORM == "java"
33
35
  spec.add_development_dependency("ed25519", "~> 1.2")
36
+ spec.add_development_dependency('x25519') unless RUBY_PLATFORM == 'java'
34
37
  end
35
38
 
36
- spec.add_development_dependency "bundler", "~> 1.11"
37
-
39
+ spec.add_development_dependency "bundler", ">= 1.17"
38
40
  spec.add_development_dependency "minitest", "~> 5.10"
39
- spec.add_development_dependency "mocha", ">= 1.2.1"
41
+ spec.add_development_dependency "mocha", "~> 1.11.2"
40
42
  spec.add_development_dependency "rake", "~> 12.0"
41
- spec.add_development_dependency "rubocop", "~> 0.54.0"
43
+ spec.add_development_dependency "rubocop", "~> 0.74.0"
42
44
  end
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: 5.2.0
4
+ version: 6.0.0
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
- c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0xOTAzMTEwOTQ1MzZaFw0yMDAzMTAw
17
- OTQ1MzZaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
16
+ c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMDA0MTEwNTQyMTZaFw0yMTA0MTEw
17
+ NTQyMTZaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
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
- ggEBAILNXrrFaLruwlBoTx3F7iL5wiRUT+cOMfdon25gzX8Tf87hi6rITnRgFfak
28
- w+C/rbrYOuEfUJMeZSU5ASxzrB4ohgJ5AFxuxGNkWEQJC4nICGn3ML8PmHzEV12z
29
- +nMm9AtBM16dJTdTKA2B6du0ZtTtbm4M3ULB7rhkUO2L2RbDyyiGQw85IBdaVdzr
30
- GmrxZPAOhBABOREsvJU1+3GIyJncqXmtrYUGUoLiIf/WO0mxPzYALZC/6ZYfu2UP
31
- +MqVFjDxsJA7cDfACke51RypSH1gZoPjzoW6w0sMRAzZT8hU1eGyqtNuBiSZ1UKv
32
- B/ztNLEP0OWhpj/NZ1fnGRvo/T0=
27
+ ggEBAJTylLYXo5AybI+tLq79+OXQ8/nbGZ7iydU1uTHQud1JZQ1MRV5dRDjeBmCT
28
+ lRxaEZT4NopEzuHO0sm3nVpSYtQwTaQyVKmnllNI3kc0f4H6i7dpPd7eUAQ3/O2I
29
+ eWjDJlzu0zwqTa+N6vzS8Y3ypDSGgb1gJKzluOv7viVUAthmuuJws7XQq/qMMaNw
30
+ 3163oCKuJvMW1w8kdUMQqvlLJkVKaxz9K64r2+a04Ok1cKloTB3OSowfAYFoRlqP
31
+ voajiJNS75Pw/2j13WnPB4Q6w7dHSb57E/VluBpVKmcQZN0dGdAkEIVty3v7kw9g
32
+ y++VpCpWM/PstIFv4ApZMf501UY=
33
33
  -----END CERTIFICATE-----
34
- date: 2019-03-11 00:00:00.000000000 Z
34
+ date: 2020-04-20 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.11'
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.11'
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.1
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.1
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: 0.54.0
140
+ version: 0.74.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: 0.54.0
147
+ version: 0.74.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,7 +154,7 @@ executables: []
140
154
  extensions: []
141
155
  extra_rdoc_files:
142
156
  - LICENSE.txt
143
- - README.rdoc
157
+ - README.md
144
158
  files:
145
159
  - ".gitignore"
146
160
  - ".rubocop.yml"
@@ -149,11 +163,10 @@ files:
149
163
  - CHANGES.txt
150
164
  - Gemfile
151
165
  - Gemfile.noed25519
152
- - Gemfile.noed25519.lock
153
166
  - ISSUE_TEMPLATE.md
154
167
  - LICENSE.txt
155
168
  - Manifest
156
- - README.rdoc
169
+ - README.md
157
170
  - Rakefile
158
171
  - THANKS.txt
159
172
  - appveyor.yml
@@ -195,7 +208,6 @@ files:
195
208
  - lib/net/ssh/proxy/jump.rb
196
209
  - lib/net/ssh/proxy/socks4.rb
197
210
  - lib/net/ssh/proxy/socks5.rb
198
- - lib/net/ssh/ruby_compat.rb
199
211
  - lib/net/ssh/service/forward.rb
200
212
  - lib/net/ssh/test.rb
201
213
  - lib/net/ssh/test/channel.rb
@@ -220,10 +232,16 @@ files:
220
232
  - lib/net/ssh/transport/hmac/sha1_96.rb
221
233
  - lib/net/ssh/transport/hmac/sha2_256.rb
222
234
  - lib/net/ssh/transport/hmac/sha2_256_96.rb
235
+ - lib/net/ssh/transport/hmac/sha2_256_etm.rb
223
236
  - lib/net/ssh/transport/hmac/sha2_512.rb
224
237
  - lib/net/ssh/transport/hmac/sha2_512_96.rb
238
+ - lib/net/ssh/transport/hmac/sha2_512_etm.rb
225
239
  - lib/net/ssh/transport/identity_cipher.rb
226
240
  - lib/net/ssh/transport/kex.rb
241
+ - lib/net/ssh/transport/kex/abstract.rb
242
+ - lib/net/ssh/transport/kex/abstract5656.rb
243
+ - lib/net/ssh/transport/kex/curve25519_sha256.rb
244
+ - lib/net/ssh/transport/kex/curve25519_sha256_loader.rb
227
245
  - lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
228
246
  - lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
229
247
  - lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
@@ -244,12 +262,12 @@ files:
244
262
  - lib/net/ssh/version.rb
245
263
  - net-ssh-public_cert.pem
246
264
  - net-ssh.gemspec
247
- - support/arcfour_check.rb
248
265
  - support/ssh_tunnel_bug.rb
249
266
  homepage: https://github.com/net-ssh/net-ssh
250
267
  licenses:
251
268
  - MIT
252
- metadata: {}
269
+ metadata:
270
+ changelog_uri: https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt
253
271
  post_install_message:
254
272
  rdoc_options: []
255
273
  require_paths:
@@ -258,15 +276,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
276
  requirements:
259
277
  - - ">="
260
278
  - !ruby/object:Gem::Version
261
- version: 2.2.6
279
+ version: '2.3'
262
280
  required_rubygems_version: !ruby/object:Gem::Requirement
263
281
  requirements:
264
282
  - - ">="
265
283
  - !ruby/object:Gem::Version
266
284
  version: '0'
267
285
  requirements: []
268
- rubyforge_project:
269
- rubygems_version: 2.6.8
286
+ rubygems_version: 3.0.3
270
287
  signing_key:
271
288
  specification_version: 4
272
289
  summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- rj��jn��� ��G]F�#��5-�4�P������
2
- uЭ3[I���m�
3
- �֒3����ty�#h�Kk�2J��B�䫼���M�}��s�*��` ��
1
+ q�v͊�.���kA1Y�bҭ��NL�a��I��T����<K:�n�������@sN�*P�sRߩ��K��������H��B8��'LA�a��K� 畅��i4���܄��4�)@A��� ��9G�ʞ���I�����tD��ڐ P�Ѐ�Z�
2
+ �pO������r��-��Wj7���T�8�o��P�d9��Y��Y:1Z��ꊚJW�V�$�ݢ��G,�Q-�U �wr�?8#�����=!6����9+��I�=
@@ -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
@@ -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.