net-ssh 5.0.2 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.dockerignore +6 -0
  4. data/.github/config/rubocop_linter_action.yml +4 -0
  5. data/.github/workflows/ci-with-docker.yml +44 -0
  6. data/.github/workflows/ci.yml +87 -0
  7. data/.github/workflows/rubocop.yml +13 -0
  8. data/.gitignore +3 -0
  9. data/.rubocop.yml +19 -2
  10. data/.rubocop_todo.yml +623 -511
  11. data/CHANGES.txt +76 -0
  12. data/Dockerfile +27 -0
  13. data/Dockerfile.openssl3 +17 -0
  14. data/Gemfile +2 -0
  15. data/Gemfile.noed25519 +2 -0
  16. data/Manifest +0 -1
  17. data/README.md +293 -0
  18. data/Rakefile +6 -2
  19. data/appveyor.yml +4 -2
  20. data/docker-compose.yml +23 -0
  21. data/lib/net/ssh/authentication/agent.rb +36 -14
  22. data/lib/net/ssh/authentication/certificate.rb +19 -7
  23. data/lib/net/ssh/authentication/constants.rb +0 -1
  24. data/lib/net/ssh/authentication/ed25519.rb +83 -50
  25. data/lib/net/ssh/authentication/ed25519_loader.rb +5 -8
  26. data/lib/net/ssh/authentication/key_manager.rb +74 -33
  27. data/lib/net/ssh/authentication/methods/abstract.rb +12 -3
  28. data/lib/net/ssh/authentication/methods/hostbased.rb +3 -5
  29. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +5 -3
  30. data/lib/net/ssh/authentication/methods/none.rb +6 -9
  31. data/lib/net/ssh/authentication/methods/password.rb +2 -3
  32. data/lib/net/ssh/authentication/methods/publickey.rb +58 -16
  33. data/lib/net/ssh/authentication/pageant.rb +97 -97
  34. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +2 -3
  35. data/lib/net/ssh/authentication/session.rb +27 -23
  36. data/lib/net/ssh/buffer.rb +91 -40
  37. data/lib/net/ssh/buffered_io.rb +24 -26
  38. data/lib/net/ssh/config.rb +99 -53
  39. data/lib/net/ssh/connection/channel.rb +101 -87
  40. data/lib/net/ssh/connection/constants.rb +0 -4
  41. data/lib/net/ssh/connection/event_loop.rb +30 -25
  42. data/lib/net/ssh/connection/keepalive.rb +12 -12
  43. data/lib/net/ssh/connection/session.rb +115 -111
  44. data/lib/net/ssh/connection/term.rb +56 -58
  45. data/lib/net/ssh/errors.rb +12 -12
  46. data/lib/net/ssh/key_factory.rb +108 -22
  47. data/lib/net/ssh/known_hosts.rb +120 -36
  48. data/lib/net/ssh/loggable.rb +10 -11
  49. data/lib/net/ssh/packet.rb +1 -1
  50. data/lib/net/ssh/prompt.rb +9 -11
  51. data/lib/net/ssh/proxy/command.rb +1 -2
  52. data/lib/net/ssh/proxy/errors.rb +2 -4
  53. data/lib/net/ssh/proxy/http.rb +18 -20
  54. data/lib/net/ssh/proxy/https.rb +8 -10
  55. data/lib/net/ssh/proxy/jump.rb +8 -10
  56. data/lib/net/ssh/proxy/socks4.rb +2 -4
  57. data/lib/net/ssh/proxy/socks5.rb +3 -6
  58. data/lib/net/ssh/service/forward.rb +9 -8
  59. data/lib/net/ssh/test/channel.rb +24 -26
  60. data/lib/net/ssh/test/extensions.rb +37 -35
  61. data/lib/net/ssh/test/kex.rb +6 -8
  62. data/lib/net/ssh/test/local_packet.rb +0 -2
  63. data/lib/net/ssh/test/packet.rb +3 -3
  64. data/lib/net/ssh/test/remote_packet.rb +6 -8
  65. data/lib/net/ssh/test/script.rb +25 -27
  66. data/lib/net/ssh/test/socket.rb +12 -15
  67. data/lib/net/ssh/test.rb +12 -12
  68. data/lib/net/ssh/transport/algorithms.rb +177 -118
  69. data/lib/net/ssh/transport/cipher_factory.rb +34 -50
  70. data/lib/net/ssh/transport/constants.rb +13 -9
  71. data/lib/net/ssh/transport/ctr.rb +8 -14
  72. data/lib/net/ssh/transport/hmac/abstract.rb +20 -5
  73. data/lib/net/ssh/transport/hmac/md5.rb +0 -2
  74. data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
  75. data/lib/net/ssh/transport/hmac/none.rb +0 -2
  76. data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
  77. data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
  78. data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
  79. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  80. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  81. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  82. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  83. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  84. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  85. data/lib/net/ssh/transport/hmac.rb +13 -11
  86. data/lib/net/ssh/transport/identity_cipher.rb +11 -13
  87. data/lib/net/ssh/transport/kex/abstract.rb +130 -0
  88. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  89. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +39 -0
  90. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  91. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +5 -19
  92. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
  93. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +30 -139
  94. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +1 -8
  95. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  96. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +20 -81
  97. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
  98. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
  99. data/lib/net/ssh/transport/kex.rb +15 -10
  100. data/lib/net/ssh/transport/key_expander.rb +7 -8
  101. data/lib/net/ssh/transport/openssl.rb +149 -111
  102. data/lib/net/ssh/transport/packet_stream.rb +53 -22
  103. data/lib/net/ssh/transport/server_version.rb +17 -16
  104. data/lib/net/ssh/transport/session.rb +35 -11
  105. data/lib/net/ssh/transport/state.rb +44 -44
  106. data/lib/net/ssh/verifiers/accept_new.rb +7 -2
  107. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +1 -2
  108. data/lib/net/ssh/verifiers/always.rb +10 -4
  109. data/lib/net/ssh/verifiers/never.rb +4 -2
  110. data/lib/net/ssh/version.rb +2 -2
  111. data/lib/net/ssh.rb +17 -9
  112. data/net-ssh-public_cert.pem +18 -19
  113. data/net-ssh.gemspec +9 -7
  114. data/support/ssh_tunnel_bug.rb +3 -3
  115. data.tar.gz.sig +0 -0
  116. metadata +65 -41
  117. metadata.gz.sig +0 -0
  118. data/.travis.yml +0 -52
  119. data/Gemfile.noed25519.lock +0 -41
  120. data/README.rdoc +0 -169
  121. data/lib/net/ssh/ruby_compat.rb +0 -13
  122. data/support/arcfour_check.rb +0 -20
@@ -4,7 +4,6 @@ require 'net/ssh/known_hosts'
4
4
  module Net
5
5
  module SSH
6
6
  module Verifiers
7
-
8
7
  # Does a strict host verification, looking the server up in the known
9
8
  # host files to see if a key has already been seen for this server. If this
10
9
  # server does not appear in any host file, an exception will be raised
@@ -22,9 +21,13 @@ module Net
22
21
 
23
22
  # If we found any matches, check to see that the key type and
24
23
  # blob also match.
24
+
25
25
  found = host_keys.any? do |key|
26
- key.ssh_type == arguments[:key].ssh_type &&
27
- key.to_blob == arguments[:key].to_blob
26
+ if key.respond_to?(:matches_key?)
27
+ key.matches_key?(arguments[:key])
28
+ else
29
+ key.ssh_type == arguments[:key].ssh_type && key.to_blob == arguments[:key].to_blob
30
+ end
28
31
  end
29
32
 
30
33
  # If a match was found, return true. Otherwise, raise an exception
@@ -34,6 +37,10 @@ module Net
34
37
  found
35
38
  end
36
39
 
40
+ def verify_signature(&block)
41
+ yield
42
+ end
43
+
37
44
  private
38
45
 
39
46
  def process_cache_miss(host_keys, args, exc_class, message)
@@ -46,7 +53,6 @@ module Net
46
53
  raise exception
47
54
  end
48
55
  end
49
-
50
56
  end
51
57
  end
52
58
  end
@@ -1,7 +1,6 @@
1
1
  module Net
2
2
  module SSH
3
3
  module Verifiers
4
-
5
4
  # This host key verifier simply allows every key it sees, without
6
5
  # any verification. This is simple, but very insecure because it
7
6
  # exposes you to MiTM attacks.
@@ -10,8 +9,11 @@ module Net
10
9
  def verify(arguments)
11
10
  true
12
11
  end
13
- end
14
12
 
13
+ def verify_signature(&block)
14
+ true
15
+ end
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -46,13 +46,13 @@ 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 = 7
50
50
 
51
51
  # The minor component of this version of the Net::SSH library
52
52
  MINOR = 0
53
53
 
54
54
  # The tiny component of this version of the Net::SSH library
55
- TINY = 2
55
+ TINY = 1
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
data/lib/net/ssh.rb CHANGED
@@ -4,6 +4,7 @@ ENV['HOME'] ||= ENV['HOMEPATH'] ? "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" : Dir.
4
4
 
5
5
  require 'logger'
6
6
  require 'etc'
7
+ require 'shellwords'
7
8
 
8
9
  require 'net/ssh/config'
9
10
  require 'net/ssh/errors'
@@ -14,7 +15,6 @@ require 'net/ssh/connection/session'
14
15
  require 'net/ssh/prompt'
15
16
 
16
17
  module Net
17
-
18
18
  # Net::SSH is a library for interacting, programmatically, with remote
19
19
  # processes via the SSH2 protocol. Sessions are always initiated via
20
20
  # Net::SSH.start. From there, a program interacts with the new SSH session
@@ -66,14 +66,14 @@ module Net
66
66
  auth_methods bind_address compression compression_level config
67
67
  encryption forward_agent hmac host_key remote_user
68
68
  keepalive keepalive_interval keepalive_maxcount kex keys key_data
69
- languages logger paranoid password port proxy
69
+ keycerts languages logger paranoid password port proxy
70
70
  rekey_blocks_limit rekey_limit rekey_packet_limit timeout verbose
71
71
  known_hosts global_known_hosts_file user_known_hosts_file host_key_alias
72
72
  host_name user properties passphrase keys_only max_pkt_size
73
- max_win_size send_env use_agent number_of_password_prompts
73
+ max_win_size send_env set_env use_agent number_of_password_prompts
74
74
  append_all_supported_algorithms non_interactive password_prompt
75
75
  agent_socket_factory minimum_dh_bits verify_host_key
76
- fingerprint_hash
76
+ fingerprint_hash check_host_ip
77
77
  ]
78
78
 
79
79
  # The standard means of starting a new SSH connection. When used with a
@@ -108,6 +108,8 @@ module Net
108
108
  # * :bind_address => the IP address on the connecting machine to use in
109
109
  # establishing connection. (:bind_address is discarded if :proxy
110
110
  # is set.)
111
+ # * :check_host_ip => Also ckeck IP address when connecting to remote host.
112
+ # Defaults to +true+.
111
113
  # * :compression => the compression algorithm to use, or +true+ to use
112
114
  # whatever is supported.
113
115
  # * :compression_level => the compression level to use when sending data
@@ -119,7 +121,7 @@ module Net
119
121
  # * :forward_agent => set to true if you want the SSH agent connection to
120
122
  # be forwarded
121
123
  # * :known_hosts => a custom object holding known hosts records.
122
- # It must implement #search_for and add in a similiar manner as KnownHosts.
124
+ # It must implement #search_for and `add` in a similiar manner as KnownHosts.
123
125
  # * :global_known_hosts_file => the location of the global known hosts
124
126
  # file. Set to an array if you want to specify multiple global known
125
127
  # hosts files. Defaults to %w(/etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2).
@@ -142,6 +144,8 @@ module Net
142
144
  # * :kex => the key exchange algorithm (or algorithms) to use
143
145
  # * :keys => an array of file names of private keys to use for publickey
144
146
  # and hostbased authentication
147
+ # * :keycerts => an array of file names of key certificates to use
148
+ # with publickey authentication
145
149
  # * :key_data => an array of strings, with each element of the array being
146
150
  # a raw private key in PEM format.
147
151
  # * :keys_only => set to +true+ to use only private keys from +keys+ and
@@ -171,6 +175,8 @@ module Net
171
175
  # * :rekey_packet_limit => the max number of packets to process before rekeying
172
176
  # * :send_env => an array of local environment variable names to export to the
173
177
  # remote environment. Names may be given as String or Regexp.
178
+ # * :set_env => a hash of environment variable names and values to set to the
179
+ # remote environment. Override the ones if specified in +send_env+.
174
180
  # * :timeout => how long to wait for the initial connection to be made
175
181
  # * :user => the user name to log in as; this overrides the +user+
176
182
  # parameter, and is primarily only useful when provided via an SSH
@@ -208,7 +214,7 @@ module Net
208
214
  # * :fingerprint_hash => 'MD5' or 'SHA256', defaults to 'SHA256'
209
215
  # If +user+ parameter is nil it defaults to USER from ssh_config, or
210
216
  # local username
211
- def self.start(host, user=nil, options={}, &block)
217
+ def self.start(host, user = nil, options = {}, &block)
212
218
  invalid_options = options.keys - VALID_OPTIONS
213
219
  if invalid_options.any?
214
220
  raise ArgumentError, "invalid option(s): #{invalid_options.join(', ')}"
@@ -221,6 +227,8 @@ module Net
221
227
  options = configuration_for(host, options.fetch(:config, true)).merge(options)
222
228
  host = options.fetch(:host_name, host)
223
229
 
230
+ options[:check_host_ip] = true unless options.key?(:check_host_ip)
231
+
224
232
  if options[:non_interactive]
225
233
  options[:number_of_password_prompts] = 0
226
234
  end
@@ -242,7 +250,7 @@ module Net
242
250
  transport = Transport::Session.new(host, options)
243
251
  auth = Authentication::Session.new(transport, options)
244
252
 
245
- user = options.fetch(:user, user) || Etc.getlogin
253
+ user = options.fetch(:user, user) || Etc.getpwuid.name
246
254
  if auth.authenticate("ssh-connection", user, options[:password])
247
255
  connection = Connection::Session.new(transport, options)
248
256
  if block_given?
@@ -293,9 +301,9 @@ module Net
293
301
  end
294
302
 
295
303
  def self._sanitize_options(options)
296
- invalid_option_values = [nil,[nil]]
304
+ invalid_option_values = [nil, [nil]]
297
305
  unless (options.values & invalid_option_values).empty?
298
- nil_options = options.select { |_k,v| invalid_option_values.include?(v) }.map(&:first)
306
+ nil_options = options.select { |_k, v| invalid_option_values.include?(v) }.map(&:first)
299
307
  Kernel.warn "#{caller_locations(2, 1)[0]}: Passing nil, or [nil] to Net::SSH.start is deprecated for keys: #{nil_options.join(', ')}"
300
308
  end
301
309
  end
@@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vcNAQELBQAD
14
+ ggEBABRChgo0Jo+iXSnTpODNongzZoU0sWqwx3/FQVo8nyAyr1qFuiqpSPb4bDbU
15
+ DsVnUn3t0X/gGA8qJhutlmfTpEQCjUeyj2x9rWpD3lvttlGWV6btQ0qN4Dfc2gsw
16
+ rCp9Jpful0HGWhiwfjWfsarqAdtLzIG0UC47IN7LGeCMRJIijOsXQhiZ915eNBEw
17
+ g9+WSSGHkMFt/7vi2pFkvXSC0+RF8ovvRWf4Zw2aYXtJ1GElgi4ZS/s6ZU0gmv20
18
+ i4SfC5m5UXIVZvOBYiMuZ/1B2m6R9xU41027zfOVwRFNtlVDiNfQRq6sDmz44At/
19
+ dv8pkxXDgySe41vzlRXFsgIgz5A=
21
20
  -----END CERTIFICATE-----
data/net-ssh.gemspec CHANGED
@@ -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.6")
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", "~> 1.28.0"
42
44
  end
@@ -15,12 +15,12 @@
15
15
  # visible_hostname netsshtest
16
16
  # * Start squid squid -N -d 1 -D
17
17
  # * Run this script
18
- # * Configure browser proxy to use localhost with LOCAL_PORT.
18
+ # * Configure browser proxy to use localhost with LOCAL_PORT.
19
19
  # * Load any page, wait for it to load fully. If the page loads
20
20
  # correctly, move on. If not, something needs to be corrected.
21
21
  # * Refresh the page several times. This should cause this
22
22
  # script to failed with the error: "closed stream". You may
23
- # need to try a few times.
23
+ # need to try a few times.
24
24
  #
25
25
 
26
26
  require 'highline/import'
@@ -37,7 +37,7 @@ pass = ask("Password: ") { |q| q.echo = "*" }
37
37
  puts "Configure your browser proxy to localhost:#{LOCAL_PORT}"
38
38
 
39
39
  begin
40
- session = Net::SSH.start(host, user, password: pass)
40
+ session = Net::SSH.start(host, user, password: pass)
41
41
  session.forward.local(LOCAL_PORT, host, PROXY_PORT)
42
42
  session.loop {true}
43
43
  rescue StandardError => e
data.tar.gz.sig CHANGED
Binary file
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.0.2
4
+ version: 7.0.1
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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ongzZoU0sWqwx3/FQVo8nyAyr1qFuiqpSPb4bDbU
28
+ DsVnUn3t0X/gGA8qJhutlmfTpEQCjUeyj2x9rWpD3lvttlGWV6btQ0qN4Dfc2gsw
29
+ rCp9Jpful0HGWhiwfjWfsarqAdtLzIG0UC47IN7LGeCMRJIijOsXQhiZ915eNBEw
30
+ g9+WSSGHkMFt/7vi2pFkvXSC0+RF8ovvRWf4Zw2aYXtJ1GElgi4ZS/s6ZU0gmv20
31
+ i4SfC5m5UXIVZvOBYiMuZ/1B2m6R9xU41027zfOVwRFNtlVDiNfQRq6sDmz44At/
32
+ dv8pkxXDgySe41vzlRXFsgIgz5A=
34
33
  -----END CERTIFICATE-----
35
- date: 2018-06-17 00:00:00.000000000 Z
34
+ date: 2022-06-26 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: 1.28.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: 1.28.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,23 +154,29 @@ executables: []
141
154
  extensions: []
142
155
  extra_rdoc_files:
143
156
  - LICENSE.txt
144
- - README.rdoc
157
+ - README.md
145
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"
146
164
  - ".gitignore"
147
165
  - ".rubocop.yml"
148
166
  - ".rubocop_todo.yml"
149
- - ".travis.yml"
150
167
  - CHANGES.txt
168
+ - Dockerfile
169
+ - Dockerfile.openssl3
151
170
  - Gemfile
152
171
  - Gemfile.noed25519
153
- - Gemfile.noed25519.lock
154
172
  - ISSUE_TEMPLATE.md
155
173
  - LICENSE.txt
156
174
  - Manifest
157
- - README.rdoc
175
+ - README.md
158
176
  - Rakefile
159
177
  - THANKS.txt
160
178
  - appveyor.yml
179
+ - docker-compose.yml
161
180
  - lib/net/ssh.rb
162
181
  - lib/net/ssh/authentication/agent.rb
163
182
  - lib/net/ssh/authentication/certificate.rb
@@ -196,7 +215,6 @@ files:
196
215
  - lib/net/ssh/proxy/jump.rb
197
216
  - lib/net/ssh/proxy/socks4.rb
198
217
  - lib/net/ssh/proxy/socks5.rb
199
- - lib/net/ssh/ruby_compat.rb
200
218
  - lib/net/ssh/service/forward.rb
201
219
  - lib/net/ssh/test.rb
202
220
  - lib/net/ssh/test/channel.rb
@@ -221,11 +239,18 @@ files:
221
239
  - lib/net/ssh/transport/hmac/sha1_96.rb
222
240
  - lib/net/ssh/transport/hmac/sha2_256.rb
223
241
  - lib/net/ssh/transport/hmac/sha2_256_96.rb
242
+ - lib/net/ssh/transport/hmac/sha2_256_etm.rb
224
243
  - lib/net/ssh/transport/hmac/sha2_512.rb
225
244
  - lib/net/ssh/transport/hmac/sha2_512_96.rb
245
+ - lib/net/ssh/transport/hmac/sha2_512_etm.rb
226
246
  - lib/net/ssh/transport/identity_cipher.rb
227
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
228
252
  - lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
253
+ - lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb
229
254
  - lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
230
255
  - lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
231
256
  - lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb
@@ -245,12 +270,12 @@ files:
245
270
  - lib/net/ssh/version.rb
246
271
  - net-ssh-public_cert.pem
247
272
  - net-ssh.gemspec
248
- - support/arcfour_check.rb
249
273
  - support/ssh_tunnel_bug.rb
250
274
  homepage: https://github.com/net-ssh/net-ssh
251
275
  licenses:
252
276
  - MIT
253
- metadata: {}
277
+ metadata:
278
+ changelog_uri: https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt
254
279
  post_install_message:
255
280
  rdoc_options: []
256
281
  require_paths:
@@ -259,15 +284,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
284
  requirements:
260
285
  - - ">="
261
286
  - !ruby/object:Gem::Version
262
- version: 2.2.6
287
+ version: '2.6'
263
288
  required_rubygems_version: !ruby/object:Gem::Requirement
264
289
  requirements:
265
290
  - - ">="
266
291
  - !ruby/object:Gem::Version
267
292
  version: '0'
268
293
  requirements: []
269
- rubyforge_project:
270
- rubygems_version: 2.7.6
294
+ rubygems_version: 3.1.6
271
295
  signing_key:
272
296
  specification_version: 4
273
297
  summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
metadata.gz.sig CHANGED
Binary file
data/.travis.yml DELETED
@@ -1,52 +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
11
- - 2.3.7
12
- - 2.4.4
13
- - 2.5.1
14
- - jruby-9.1.13.0
15
- - rbx-3.84
16
- - ruby-head
17
- env:
18
- NET_SSH_RUN_INTEGRATION_TESTS=1
19
-
20
- matrix:
21
- exclude:
22
- - rvm: rbx-3.84
23
- - rvm: jruby-9.1.13.0
24
- include:
25
- - rvm: rbx-3.84
26
- env: NET_SSH_RUN_INTEGRATION_TESTS=
27
- - rvm: jruby-9.1.13.0
28
- env: JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -Xcext.enabled=false -J-Xss2m -Xcompile.invokedynamic=false' NET_SSH_RUN_INTEGRATION_TESTS=
29
- fast_finish: true
30
- allow_failures:
31
- - rvm: rbx-3.84
32
- - rvm: jruby-9.1.13.0
33
- - rvm: ruby-head
34
-
35
- install:
36
- - export JRUBY_OPTS='--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -Xcext.enabled=false -J-Xss2m -Xcompile.invokedynamic=false'
37
- - sudo pip install ansible
38
- - gem install bundler -v "= 1.16"
39
- - gem list bundler
40
- - bundle _1.16_ install
41
- - bundle _1.16_ -v
42
- - BUNDLE_GEMFILE=./Gemfile.noed25519 bundle _1.16_ install
43
- - sudo ansible-galaxy install rvm_io.ruby
44
- - sudo chown -R travis:travis /home/travis/.ansible
45
- - 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'
46
-
47
- script:
48
- - ssh -V
49
- - bundle _1.16_ exec rake test
50
- - BUNDLE_GEMFILE=./Gemfile.noed25519 bundle _1.16_ exec rake test
51
- - bundle _1.16_ exec rake test_test
52
- - bundle _1.16_ exec rubocop
@@ -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