net-ssh 5.1.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +1 -3
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +8 -2
  5. data/.rubocop_todo.yml +392 -379
  6. data/.travis.yml +16 -17
  7. data/CHANGES.txt +52 -1
  8. data/Manifest +0 -1
  9. data/README.md +287 -0
  10. data/Rakefile +1 -2
  11. data/appveyor.yml +4 -2
  12. data/lib/net/ssh/authentication/certificate.rb +10 -1
  13. data/lib/net/ssh/authentication/ed25519.rb +14 -2
  14. data/lib/net/ssh/authentication/ed25519_loader.rb +1 -1
  15. data/lib/net/ssh/authentication/key_manager.rb +34 -5
  16. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +3 -1
  17. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +0 -1
  18. data/lib/net/ssh/authentication/session.rb +9 -6
  19. data/lib/net/ssh/buffer.rb +1 -10
  20. data/lib/net/ssh/buffered_io.rb +0 -1
  21. data/lib/net/ssh/config.rb +52 -31
  22. data/lib/net/ssh/connection/channel.rb +17 -5
  23. data/lib/net/ssh/connection/event_loop.rb +0 -1
  24. data/lib/net/ssh/connection/session.rb +7 -4
  25. data/lib/net/ssh/key_factory.rb +104 -17
  26. data/lib/net/ssh/known_hosts.rb +41 -26
  27. data/lib/net/ssh/loggable.rb +2 -2
  28. data/lib/net/ssh/proxy/command.rb +0 -1
  29. data/lib/net/ssh/proxy/socks5.rb +0 -1
  30. data/lib/net/ssh/service/forward.rb +2 -1
  31. data/lib/net/ssh/test.rb +3 -2
  32. data/lib/net/ssh/transport/algorithms.rb +84 -45
  33. data/lib/net/ssh/transport/cipher_factory.rb +11 -27
  34. data/lib/net/ssh/transport/constants.rb +10 -6
  35. data/lib/net/ssh/transport/ctr.rb +1 -7
  36. data/lib/net/ssh/transport/hmac/abstract.rb +16 -0
  37. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  38. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  39. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  40. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  41. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  42. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  43. data/lib/net/ssh/transport/hmac.rb +15 -13
  44. data/lib/net/ssh/transport/kex/abstract.rb +123 -0
  45. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  46. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +38 -0
  47. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  48. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +1 -15
  49. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +9 -118
  50. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -6
  51. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  52. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +18 -79
  53. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
  54. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
  55. data/lib/net/ssh/transport/kex.rb +14 -11
  56. data/lib/net/ssh/transport/openssl.rb +104 -107
  57. data/lib/net/ssh/transport/packet_stream.rb +48 -13
  58. data/lib/net/ssh/transport/session.rb +1 -1
  59. data/lib/net/ssh/transport/state.rb +1 -1
  60. data/lib/net/ssh/version.rb +1 -1
  61. data/lib/net/ssh.rb +13 -4
  62. data/net-ssh-public_cert.pem +18 -19
  63. data/net-ssh.gemspec +9 -7
  64. data.tar.gz.sig +0 -0
  65. metadata +56 -40
  66. metadata.gz.sig +0 -0
  67. data/Gemfile.noed25519.lock +0 -41
  68. data/README.rdoc +0 -194
  69. data/lib/net/ssh/ruby_compat.rb +0 -13
  70. 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: 5.1.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -12,27 +12,26 @@ bindir: exe
12
12
  cert_chain:
13
13
  - |
14
14
  -----BEGIN CERTIFICATE-----
15
- MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZuZXRz
16
- c2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZFgNj
17
- b20wHhcNMTgwMzExMDU0MzU1WhcNMTkwMzExMDU0MzU1WjBBMQ8wDQYDVQQDDAZu
18
- ZXRzc2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZ
19
- FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGJ4TbZ9H+qZ08
20
- pQfJhPJTHaDCyQvCsKTFrL5O9z3tllQ7B/zksMMM+qFBpNYu9HCcg4yBATacE/PB
21
- qVVyUrpr6lbH/XwoN5ljXm+bdCfmnjZvTCL2FTE6o+bcnaF0IsJyC0Q2B1fbWdXN
22
- 6Off1ZWoUk6We2BIM1bn6QJLxBpGyYhvOPXsYoqSuzDf2SJDDsWFZ8kV5ON13Ohm
23
- JbBzn0oD8HF8FuYOewwsC0C1q4w7E5GtvHcQ5juweS7+RKsyDcVcVrLuNzoGRttS
24
- KP4yMn+TzaXijyjRg7gECfJr3TGASaA4bQsILFGG5dAWcwO4OMrZedR7SHj/o0Kf
25
- 3gL7P0axAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
26
- BBQF8qLA7Z4zg0SJGtUbv3eoQ8tjIzAfBgNVHREEGDAWgRRuZXRzc2hAc29sdXRp
27
- b3VzLmNvbTAfBgNVHRIEGDAWgRRuZXRzc2hAc29sdXRpb3VzLmNvbTANBgkqhkiG
28
- 9w0BAQsFAAOCAQEAnINf4yDsUx62QPKC2E+5Dj0hN2yUjcYzTGwxyz8x+nCiC0X3
29
- cyjftyEViuKvAKtZ0Uo4OG0x2SZ5O7I45OkUo1bAOFcuYRFYiD1JRlyvl8aB+2Vl
30
- pFyi/4ClnmjNxnplXL+mmScv/4VacBD1/LNBUVNluhLue2yIakAXFy0KthqLzIG8
31
- BYIiexqQMKfkw+auIcyXe1luZnCt6JFksW0BVoZGTj5Sj7sC2+cS4y9XYog1dSks
32
- ZFwoIuXKeDmTTpryd/vI7sdLXDuV6MbWOLGh6gXn9RDDXG1EqEXW0bjovATBMpdH
33
- 9OGohJvAFzcvhDTWPwT6w3PG5B80pqb9j1hEAg==
15
+ MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpuZXRz
16
+ c2gvREM9c29sdXRpb3VzL0RDPWNvbTAeFw0yMDA0MTEwNTQyMTZaFw0yMTA0MTEw
17
+ NTQyMTZaMCUxIzAhBgNVBAMMGm5ldHNzaC9EQz1zb2x1dGlvdXMvREM9Y29tMIIB
18
+ IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxieE22fR/qmdPKUHyYTyUx2g
19
+ wskLwrCkxay+Tvc97ZZUOwf85LDDDPqhQaTWLvRwnIOMgQE2nBPzwalVclK6a+pW
20
+ x/18KDeZY15vm3Qn5p42b0wi9hUxOqPm3J2hdCLCcgtENgdX21nVzejn39WVqFJO
21
+ lntgSDNW5+kCS8QaRsmIbzj17GKKkrsw39kiQw7FhWfJFeTjddzoZiWwc59KA/Bx
22
+ fBbmDnsMLAtAtauMOxORrbx3EOY7sHku/kSrMg3FXFay7jc6BkbbUij+MjJ/k82l
23
+ 4o8o0YO4BAnya90xgEmgOG0LCCxRhuXQFnMDuDjK2XnUe0h4/6NCn94C+z9GsQID
24
+ AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUBfKiwO2e
25
+ M4NEiRrVG793qEPLYyMwHwYDVR0RBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20w
26
+ HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
27
+ ggEBAJTylLYXo5AybI+tLq79+OXQ8/nbGZ7iydU1uTHQud1JZQ1MRV5dRDjeBmCT
28
+ lRxaEZT4NopEzuHO0sm3nVpSYtQwTaQyVKmnllNI3kc0f4H6i7dpPd7eUAQ3/O2I
29
+ eWjDJlzu0zwqTa+N6vzS8Y3ypDSGgb1gJKzluOv7viVUAthmuuJws7XQq/qMMaNw
30
+ 3163oCKuJvMW1w8kdUMQqvlLJkVKaxz9K64r2+a04Ok1cKloTB3OSowfAYFoRlqP
31
+ voajiJNS75Pw/2j13WnPB4Q6w7dHSb57E/VluBpVKmcQZN0dGdAkEIVty3v7kw9g
32
+ y++VpCpWM/PstIFv4ApZMf501UY=
34
33
  -----END CERTIFICATE-----
35
- date: 2018-12-28 00:00:00.000000000 Z
34
+ date: 2020-06-09 00:00:00.000000000 Z
36
35
  dependencies:
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: bcrypt_pbkdf
@@ -62,20 +61,34 @@ dependencies:
62
61
  - - "~>"
63
62
  - !ruby/object:Gem::Version
64
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'
65
78
  - !ruby/object:Gem::Dependency
66
79
  name: bundler
67
80
  requirement: !ruby/object:Gem::Requirement
68
81
  requirements:
69
- - - "~>"
82
+ - - ">="
70
83
  - !ruby/object:Gem::Version
71
- version: '1.11'
84
+ version: '1.17'
72
85
  type: :development
73
86
  prerelease: false
74
87
  version_requirements: !ruby/object:Gem::Requirement
75
88
  requirements:
76
- - - "~>"
89
+ - - ">="
77
90
  - !ruby/object:Gem::Version
78
- version: '1.11'
91
+ version: '1.17'
79
92
  - !ruby/object:Gem::Dependency
80
93
  name: minitest
81
94
  requirement: !ruby/object:Gem::Requirement
@@ -94,16 +107,16 @@ dependencies:
94
107
  name: mocha
95
108
  requirement: !ruby/object:Gem::Requirement
96
109
  requirements:
97
- - - ">="
110
+ - - "~>"
98
111
  - !ruby/object:Gem::Version
99
- version: 1.2.1
112
+ version: 1.11.2
100
113
  type: :development
101
114
  prerelease: false
102
115
  version_requirements: !ruby/object:Gem::Requirement
103
116
  requirements:
104
- - - ">="
117
+ - - "~>"
105
118
  - !ruby/object:Gem::Version
106
- version: 1.2.1
119
+ version: 1.11.2
107
120
  - !ruby/object:Gem::Dependency
108
121
  name: rake
109
122
  requirement: !ruby/object:Gem::Requirement
@@ -124,14 +137,14 @@ dependencies:
124
137
  requirements:
125
138
  - - "~>"
126
139
  - !ruby/object:Gem::Version
127
- version: 0.54.0
140
+ version: 0.74.0
128
141
  type: :development
129
142
  prerelease: false
130
143
  version_requirements: !ruby/object:Gem::Requirement
131
144
  requirements:
132
145
  - - "~>"
133
146
  - !ruby/object:Gem::Version
134
- version: 0.54.0
147
+ version: 0.74.0
135
148
  description: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It
136
149
  allows you to write programs that invoke and interact with processes on remote servers,
137
150
  via SSH2.'
@@ -141,7 +154,7 @@ executables: []
141
154
  extensions: []
142
155
  extra_rdoc_files:
143
156
  - LICENSE.txt
144
- - README.rdoc
157
+ - README.md
145
158
  files:
146
159
  - ".gitignore"
147
160
  - ".rubocop.yml"
@@ -150,11 +163,10 @@ files:
150
163
  - CHANGES.txt
151
164
  - Gemfile
152
165
  - Gemfile.noed25519
153
- - Gemfile.noed25519.lock
154
166
  - ISSUE_TEMPLATE.md
155
167
  - LICENSE.txt
156
168
  - Manifest
157
- - README.rdoc
169
+ - README.md
158
170
  - Rakefile
159
171
  - THANKS.txt
160
172
  - appveyor.yml
@@ -196,7 +208,6 @@ files:
196
208
  - lib/net/ssh/proxy/jump.rb
197
209
  - lib/net/ssh/proxy/socks4.rb
198
210
  - lib/net/ssh/proxy/socks5.rb
199
- - lib/net/ssh/ruby_compat.rb
200
211
  - lib/net/ssh/service/forward.rb
201
212
  - lib/net/ssh/test.rb
202
213
  - lib/net/ssh/test/channel.rb
@@ -221,10 +232,16 @@ files:
221
232
  - lib/net/ssh/transport/hmac/sha1_96.rb
222
233
  - lib/net/ssh/transport/hmac/sha2_256.rb
223
234
  - lib/net/ssh/transport/hmac/sha2_256_96.rb
235
+ - lib/net/ssh/transport/hmac/sha2_256_etm.rb
224
236
  - lib/net/ssh/transport/hmac/sha2_512.rb
225
237
  - lib/net/ssh/transport/hmac/sha2_512_96.rb
238
+ - lib/net/ssh/transport/hmac/sha2_512_etm.rb
226
239
  - lib/net/ssh/transport/identity_cipher.rb
227
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
228
245
  - lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
229
246
  - lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
230
247
  - lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
@@ -245,12 +262,12 @@ files:
245
262
  - lib/net/ssh/version.rb
246
263
  - net-ssh-public_cert.pem
247
264
  - net-ssh.gemspec
248
- - support/arcfour_check.rb
249
265
  - support/ssh_tunnel_bug.rb
250
266
  homepage: https://github.com/net-ssh/net-ssh
251
267
  licenses:
252
268
  - MIT
253
- metadata: {}
269
+ metadata:
270
+ changelog_uri: https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt
254
271
  post_install_message:
255
272
  rdoc_options: []
256
273
  require_paths:
@@ -259,15 +276,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
276
  requirements:
260
277
  - - ">="
261
278
  - !ruby/object:Gem::Version
262
- version: 2.2.6
279
+ version: '2.3'
263
280
  required_rubygems_version: !ruby/object:Gem::Requirement
264
281
  requirements:
265
282
  - - ">="
266
283
  - !ruby/object:Gem::Version
267
284
  version: '0'
268
285
  requirements: []
269
- rubyforge_project:
270
- rubygems_version: 2.6.8
286
+ rubygems_version: 3.0.3
271
287
  signing_key:
272
288
  specification_version: 4
273
289
  summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
metadata.gz.sig CHANGED
Binary file
@@ -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.
@@ -1,13 +0,0 @@
1
- require 'thread'
2
-
3
- class String
4
- if RUBY_VERSION < "1.9"
5
- def getbyte(index)
6
- self[index]
7
- end
8
-
9
- def setbyte(index, c)
10
- self[index] = c
11
- end
12
- end
13
- end
@@ -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
-