net-ssh 4.2.0 → 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.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/.dockerignore +6 -0
- data/.github/config/rubocop_linter_action.yml +4 -0
- data/.github/workflows/ci-with-docker.yml +44 -0
- data/.github/workflows/ci.yml +87 -0
- data/.github/workflows/rubocop.yml +13 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +19 -2
- data/.rubocop_todo.yml +619 -667
- data/CHANGES.txt +110 -1
- data/Dockerfile +27 -0
- data/Dockerfile.openssl3 +17 -0
- data/Gemfile +3 -7
- data/{Gemfile.norbnacl → Gemfile.noed25519} +3 -1
- data/Manifest +4 -5
- data/README.md +293 -0
- data/Rakefile +45 -29
- data/appveyor.yml +8 -6
- data/docker-compose.yml +23 -0
- data/lib/net/ssh/authentication/agent.rb +248 -223
- data/lib/net/ssh/authentication/certificate.rb +178 -164
- data/lib/net/ssh/authentication/constants.rb +17 -15
- data/lib/net/ssh/authentication/ed25519.rb +141 -116
- data/lib/net/ssh/authentication/ed25519_loader.rb +28 -28
- data/lib/net/ssh/authentication/key_manager.rb +79 -36
- data/lib/net/ssh/authentication/methods/abstract.rb +62 -47
- data/lib/net/ssh/authentication/methods/hostbased.rb +34 -37
- data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +3 -3
- data/lib/net/ssh/authentication/methods/none.rb +16 -19
- data/lib/net/ssh/authentication/methods/password.rb +15 -16
- data/lib/net/ssh/authentication/methods/publickey.rb +96 -55
- data/lib/net/ssh/authentication/pageant.rb +468 -465
- data/lib/net/ssh/authentication/pub_key_fingerprint.rb +43 -0
- data/lib/net/ssh/authentication/session.rb +131 -122
- data/lib/net/ssh/buffer.rb +385 -332
- data/lib/net/ssh/buffered_io.rb +150 -151
- data/lib/net/ssh/config.rb +316 -239
- data/lib/net/ssh/connection/channel.rb +635 -613
- data/lib/net/ssh/connection/constants.rb +29 -29
- data/lib/net/ssh/connection/event_loop.rb +104 -95
- data/lib/net/ssh/connection/keepalive.rb +55 -51
- data/lib/net/ssh/connection/session.rb +614 -611
- data/lib/net/ssh/connection/term.rb +125 -123
- data/lib/net/ssh/errors.rb +101 -99
- data/lib/net/ssh/key_factory.rb +194 -108
- data/lib/net/ssh/known_hosts.rb +212 -134
- data/lib/net/ssh/loggable.rb +50 -49
- data/lib/net/ssh/packet.rb +83 -79
- data/lib/net/ssh/prompt.rb +51 -51
- data/lib/net/ssh/proxy/command.rb +105 -91
- data/lib/net/ssh/proxy/errors.rb +12 -10
- data/lib/net/ssh/proxy/http.rb +81 -81
- data/lib/net/ssh/proxy/https.rb +37 -36
- data/lib/net/ssh/proxy/jump.rb +49 -48
- data/lib/net/ssh/proxy/socks4.rb +2 -6
- data/lib/net/ssh/proxy/socks5.rb +14 -17
- data/lib/net/ssh/service/forward.rb +365 -362
- data/lib/net/ssh/test/channel.rb +145 -143
- data/lib/net/ssh/test/extensions.rb +131 -127
- data/lib/net/ssh/test/kex.rb +34 -32
- data/lib/net/ssh/test/local_packet.rb +46 -44
- data/lib/net/ssh/test/packet.rb +87 -84
- data/lib/net/ssh/test/remote_packet.rb +32 -30
- data/lib/net/ssh/test/script.rb +155 -155
- data/lib/net/ssh/test/socket.rb +49 -48
- data/lib/net/ssh/test.rb +82 -80
- data/lib/net/ssh/transport/algorithms.rb +433 -364
- data/lib/net/ssh/transport/cipher_factory.rb +95 -91
- data/lib/net/ssh/transport/constants.rb +32 -24
- data/lib/net/ssh/transport/ctr.rb +37 -15
- data/lib/net/ssh/transport/hmac/abstract.rb +81 -63
- data/lib/net/ssh/transport/hmac/md5.rb +0 -2
- data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
- data/lib/net/ssh/transport/hmac/none.rb +0 -2
- data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
- data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
- data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
- data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
- data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
- data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
- data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
- data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
- data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
- data/lib/net/ssh/transport/hmac.rb +14 -12
- data/lib/net/ssh/transport/identity_cipher.rb +54 -52
- data/lib/net/ssh/transport/kex/abstract.rb +130 -0
- data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
- data/lib/net/ssh/transport/kex/curve25519_sha256.rb +39 -0
- data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
- data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +33 -40
- data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
- data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +112 -217
- data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +53 -63
- data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
- data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +36 -90
- data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +18 -10
- data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +18 -10
- data/lib/net/ssh/transport/kex.rb +15 -12
- data/lib/net/ssh/transport/key_expander.rb +24 -21
- data/lib/net/ssh/transport/openssl.rb +158 -133
- data/lib/net/ssh/transport/packet_stream.rb +223 -191
- data/lib/net/ssh/transport/server_version.rb +55 -56
- data/lib/net/ssh/transport/session.rb +306 -259
- data/lib/net/ssh/transport/state.rb +178 -176
- data/lib/net/ssh/verifiers/accept_new.rb +33 -0
- data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +33 -0
- data/lib/net/ssh/verifiers/always.rb +58 -0
- data/lib/net/ssh/verifiers/never.rb +19 -0
- data/lib/net/ssh/version.rb +55 -53
- data/lib/net/ssh.rb +47 -34
- data/net-ssh-public_cert.pem +18 -19
- data/net-ssh.gemspec +12 -11
- data/support/ssh_tunnel_bug.rb +5 -5
- data.tar.gz.sig +0 -0
- metadata +78 -73
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -51
- data/Gemfile.norbnacl.lock +0 -41
- data/README.rdoc +0 -169
- data/lib/net/ssh/ruby_compat.rb +0 -24
- data/lib/net/ssh/verifiers/lenient.rb +0 -30
- data/lib/net/ssh/verifiers/null.rb +0 -12
- data/lib/net/ssh/verifiers/secure.rb +0 -52
- data/lib/net/ssh/verifiers/strict.rb +0 -24
- data/support/arcfour_check.rb +0 -20
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
|
|
@@ -62,17 +62,18 @@ module Net
|
|
|
62
62
|
module SSH
|
|
63
63
|
# This is the set of options that Net::SSH.start recognizes. See
|
|
64
64
|
# Net::SSH.start for a description of each option.
|
|
65
|
-
VALID_OPTIONS = [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
VALID_OPTIONS = %i[
|
|
66
|
+
auth_methods bind_address compression compression_level config
|
|
67
|
+
encryption forward_agent hmac host_key remote_user
|
|
68
|
+
keepalive keepalive_interval keepalive_maxcount kex keys key_data
|
|
69
|
+
keycerts languages logger paranoid password port proxy
|
|
70
|
+
rekey_blocks_limit rekey_limit rekey_packet_limit timeout verbose
|
|
71
|
+
known_hosts global_known_hosts_file user_known_hosts_file host_key_alias
|
|
72
|
+
host_name user properties passphrase keys_only max_pkt_size
|
|
73
|
+
max_win_size send_env set_env use_agent number_of_password_prompts
|
|
74
|
+
append_all_supported_algorithms non_interactive password_prompt
|
|
75
|
+
agent_socket_factory minimum_dh_bits verify_host_key
|
|
76
|
+
fingerprint_hash check_host_ip
|
|
76
77
|
]
|
|
77
78
|
|
|
78
79
|
# The standard means of starting a new SSH connection. When used with a
|
|
@@ -107,6 +108,8 @@ module Net
|
|
|
107
108
|
# * :bind_address => the IP address on the connecting machine to use in
|
|
108
109
|
# establishing connection. (:bind_address is discarded if :proxy
|
|
109
110
|
# is set.)
|
|
111
|
+
# * :check_host_ip => Also ckeck IP address when connecting to remote host.
|
|
112
|
+
# Defaults to +true+.
|
|
110
113
|
# * :compression => the compression algorithm to use, or +true+ to use
|
|
111
114
|
# whatever is supported.
|
|
112
115
|
# * :compression_level => the compression level to use when sending data
|
|
@@ -118,7 +121,7 @@ module Net
|
|
|
118
121
|
# * :forward_agent => set to true if you want the SSH agent connection to
|
|
119
122
|
# be forwarded
|
|
120
123
|
# * :known_hosts => a custom object holding known hosts records.
|
|
121
|
-
# 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.
|
|
122
125
|
# * :global_known_hosts_file => the location of the global known hosts
|
|
123
126
|
# file. Set to an array if you want to specify multiple global known
|
|
124
127
|
# hosts files. Defaults to %w(/etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2).
|
|
@@ -141,6 +144,8 @@ module Net
|
|
|
141
144
|
# * :kex => the key exchange algorithm (or algorithms) to use
|
|
142
145
|
# * :keys => an array of file names of private keys to use for publickey
|
|
143
146
|
# and hostbased authentication
|
|
147
|
+
# * :keycerts => an array of file names of key certificates to use
|
|
148
|
+
# with publickey authentication
|
|
144
149
|
# * :key_data => an array of strings, with each element of the array being
|
|
145
150
|
# a raw private key in PEM format.
|
|
146
151
|
# * :keys_only => set to +true+ to use only private keys from +keys+ and
|
|
@@ -170,6 +175,8 @@ module Net
|
|
|
170
175
|
# * :rekey_packet_limit => the max number of packets to process before rekeying
|
|
171
176
|
# * :send_env => an array of local environment variable names to export to the
|
|
172
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+.
|
|
173
180
|
# * :timeout => how long to wait for the initial connection to be made
|
|
174
181
|
# * :user => the user name to log in as; this overrides the +user+
|
|
175
182
|
# parameter, and is primarily only useful when provided via an SSH
|
|
@@ -192,18 +199,22 @@ module Net
|
|
|
192
199
|
# * :password_prompt => a custom prompt object with ask method. See Net::SSH::Prompt
|
|
193
200
|
#
|
|
194
201
|
# * :agent_socket_factory => enables the user to pass a lambda/block that will serve as the socket factory
|
|
195
|
-
# Net::SSH
|
|
202
|
+
# Net::SSH.start(host,user,agent_socket_factory: ->{ UNIXSocket.open('/foo/bar') })
|
|
196
203
|
# example: ->{ UNIXSocket.open('/foo/bar')}
|
|
197
|
-
# * :verify_host_key =>
|
|
198
|
-
#
|
|
204
|
+
# * :verify_host_key => specify how strict host-key verification should be.
|
|
205
|
+
# In order of increasing strictness:
|
|
206
|
+
# * :never (very insecure) ::Net::SSH::Verifiers::Never
|
|
207
|
+
# * :accept_new_or_local_tunnel (insecure) ::Net::SSH::Verifiers::AcceptNewOrLocalTunnel
|
|
208
|
+
# * :accept_new (insecure) ::Net::SSH::Verifiers::AcceptNew
|
|
209
|
+
# * :always (secure) ::Net::SSH::Verifiers::Always
|
|
199
210
|
# You can also provide an own Object which responds to +verify+. The argument
|
|
200
211
|
# given to +verify+ is a hash consisting of the +:key+, the +:key_blob+,
|
|
201
212
|
# the +:fingerprint+ and the +:session+. Returning true accepts the host key,
|
|
202
213
|
# returning false declines it and closes the connection.
|
|
203
|
-
#
|
|
214
|
+
# * :fingerprint_hash => 'MD5' or 'SHA256', defaults to 'SHA256'
|
|
204
215
|
# If +user+ parameter is nil it defaults to USER from ssh_config, or
|
|
205
216
|
# local username
|
|
206
|
-
def self.start(host, user=nil, options={}, &block)
|
|
217
|
+
def self.start(host, user = nil, options = {}, &block)
|
|
207
218
|
invalid_options = options.keys - VALID_OPTIONS
|
|
208
219
|
if invalid_options.any?
|
|
209
220
|
raise ArgumentError, "invalid option(s): #{invalid_options.join(', ')}"
|
|
@@ -216,6 +227,8 @@ module Net
|
|
|
216
227
|
options = configuration_for(host, options.fetch(:config, true)).merge(options)
|
|
217
228
|
host = options.fetch(:host_name, host)
|
|
218
229
|
|
|
230
|
+
options[:check_host_ip] = true unless options.key?(:check_host_ip)
|
|
231
|
+
|
|
219
232
|
if options[:non_interactive]
|
|
220
233
|
options[:number_of_password_prompts] = 0
|
|
221
234
|
end
|
|
@@ -224,20 +237,20 @@ module Net
|
|
|
224
237
|
|
|
225
238
|
if options[:verbose]
|
|
226
239
|
options[:logger].level = case options[:verbose]
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
240
|
+
when Integer then options[:verbose]
|
|
241
|
+
when :debug then Logger::DEBUG
|
|
242
|
+
when :info then Logger::INFO
|
|
243
|
+
when :warn then Logger::WARN
|
|
244
|
+
when :error then Logger::ERROR
|
|
245
|
+
when :fatal then Logger::FATAL
|
|
246
|
+
else raise ArgumentError, "can't convert #{options[:verbose].inspect} to any of the Logger level constants"
|
|
247
|
+
end
|
|
235
248
|
end
|
|
236
249
|
|
|
237
250
|
transport = Transport::Session.new(host, options)
|
|
238
251
|
auth = Authentication::Session.new(transport, options)
|
|
239
252
|
|
|
240
|
-
user = options.fetch(:user, user) || Etc.
|
|
253
|
+
user = options.fetch(:user, user) || Etc.getpwuid.name
|
|
241
254
|
if auth.authenticate("ssh-connection", user, options[:password])
|
|
242
255
|
connection = Connection::Session.new(transport, options)
|
|
243
256
|
if block_given?
|
|
@@ -266,10 +279,10 @@ module Net
|
|
|
266
279
|
# See Net::SSH::Config for the full description of all supported options.
|
|
267
280
|
def self.configuration_for(host, use_ssh_config)
|
|
268
281
|
files = case use_ssh_config
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
282
|
+
when true then Net::SSH::Config.expandable_default_files
|
|
283
|
+
when false, nil then return {}
|
|
284
|
+
else Array(use_ssh_config)
|
|
285
|
+
end
|
|
273
286
|
|
|
274
287
|
Net::SSH::Config.for(host, files)
|
|
275
288
|
end
|
|
@@ -282,15 +295,15 @@ module Net
|
|
|
282
295
|
|
|
283
296
|
options[:password_prompt] ||= Prompt.default(options)
|
|
284
297
|
|
|
285
|
-
[
|
|
298
|
+
%i[password passphrase].each do |key|
|
|
286
299
|
options.delete(key) if options.key?(key) && options[key].nil?
|
|
287
300
|
end
|
|
288
301
|
end
|
|
289
302
|
|
|
290
303
|
def self._sanitize_options(options)
|
|
291
|
-
invalid_option_values = [nil,[nil]]
|
|
304
|
+
invalid_option_values = [nil, [nil]]
|
|
292
305
|
unless (options.values & invalid_option_values).empty?
|
|
293
|
-
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)
|
|
294
307
|
Kernel.warn "#{caller_locations(2, 1)[0]}: Passing nil, or [nil] to Net::SSH.start is deprecated for keys: #{nil_options.join(', ')}"
|
|
295
308
|
end
|
|
296
309
|
end
|
data/net-ssh-public_cert.pem
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
-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91cy5jb20w
|
|
13
|
+
HwYDVR0SBBgwFoEUbmV0c3NoQHNvbHV0aW91cy5jb20wDQYJKoZIhvcNAQELBQAD
|
|
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
|
-
# coding: utf-8
|
|
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.
|
|
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.
|
|
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)/}) }
|
|
@@ -28,16 +30,15 @@ Gem::Specification.new do |spec|
|
|
|
28
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
31
|
spec.require_paths = ["lib"]
|
|
30
32
|
|
|
31
|
-
unless ENV['
|
|
32
|
-
spec.add_development_dependency("rbnacl-libsodium", "~> 1.0.11")
|
|
33
|
-
spec.add_development_dependency("rbnacl", ['>= 3.2.0','< 5.0'])
|
|
33
|
+
unless ENV['NET_SSH_NO_ED25519']
|
|
34
34
|
spec.add_development_dependency("bcrypt_pbkdf", "~> 1.0") unless RUBY_PLATFORM == "java"
|
|
35
|
+
spec.add_development_dependency("ed25519", "~> 1.2")
|
|
36
|
+
spec.add_development_dependency('x25519') unless RUBY_PLATFORM == 'java'
|
|
35
37
|
end
|
|
36
38
|
|
|
37
|
-
spec.add_development_dependency "bundler", "
|
|
38
|
-
|
|
39
|
-
spec.add_development_dependency "rake", "~> 12.0"
|
|
39
|
+
spec.add_development_dependency "bundler", ">= 1.17"
|
|
40
40
|
spec.add_development_dependency "minitest", "~> 5.10"
|
|
41
|
-
spec.add_development_dependency "
|
|
42
|
-
spec.add_development_dependency "
|
|
41
|
+
spec.add_development_dependency "mocha", "~> 1.11.2"
|
|
42
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
|
43
|
+
spec.add_development_dependency "rubocop", "~> 1.28.0"
|
|
43
44
|
end
|
data/support/ssh_tunnel_bug.rb
CHANGED
|
@@ -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,10 +37,10 @@ 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
|
-
session.loop{true}
|
|
43
|
-
rescue => e
|
|
42
|
+
session.loop {true}
|
|
43
|
+
rescue StandardError => e
|
|
44
44
|
puts e.message
|
|
45
45
|
puts e.backtrace
|
|
46
46
|
end
|
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:
|
|
4
|
+
version: 7.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jamis Buck
|
|
@@ -12,146 +12,139 @@ bindir: exe
|
|
|
12
12
|
cert_chain:
|
|
13
13
|
- |
|
|
14
14
|
-----BEGIN CERTIFICATE-----
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Zp0QrZyNZhtitrXFbZneG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
|
29
|
+
rCp9Jpful0HGWhiwfjWfsarqAdtLzIG0UC47IN7LGeCMRJIijOsXQhiZ915eNBEw
|
|
30
|
+
g9+WSSGHkMFt/7vi2pFkvXSC0+RF8ovvRWf4Zw2aYXtJ1GElgi4ZS/s6ZU0gmv20
|
|
31
|
+
i4SfC5m5UXIVZvOBYiMuZ/1B2m6R9xU41027zfOVwRFNtlVDiNfQRq6sDmz44At/
|
|
32
|
+
dv8pkxXDgySe41vzlRXFsgIgz5A=
|
|
34
33
|
-----END CERTIFICATE-----
|
|
35
|
-
date:
|
|
34
|
+
date: 2022-06-26 00:00:00.000000000 Z
|
|
36
35
|
dependencies:
|
|
37
36
|
- !ruby/object:Gem::Dependency
|
|
38
|
-
name:
|
|
37
|
+
name: bcrypt_pbkdf
|
|
39
38
|
requirement: !ruby/object:Gem::Requirement
|
|
40
39
|
requirements:
|
|
41
40
|
- - "~>"
|
|
42
41
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: 1.0
|
|
42
|
+
version: '1.0'
|
|
44
43
|
type: :development
|
|
45
44
|
prerelease: false
|
|
46
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
47
46
|
requirements:
|
|
48
47
|
- - "~>"
|
|
49
48
|
- !ruby/object:Gem::Version
|
|
50
|
-
version: 1.0
|
|
49
|
+
version: '1.0'
|
|
51
50
|
- !ruby/object:Gem::Dependency
|
|
52
|
-
name:
|
|
51
|
+
name: ed25519
|
|
53
52
|
requirement: !ruby/object:Gem::Requirement
|
|
54
53
|
requirements:
|
|
55
|
-
- - "
|
|
56
|
-
- !ruby/object:Gem::Version
|
|
57
|
-
version: 3.2.0
|
|
58
|
-
- - "<"
|
|
54
|
+
- - "~>"
|
|
59
55
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
56
|
+
version: '1.2'
|
|
61
57
|
type: :development
|
|
62
58
|
prerelease: false
|
|
63
59
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
60
|
requirements:
|
|
65
|
-
- - "
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: 3.2.0
|
|
68
|
-
- - "<"
|
|
61
|
+
- - "~>"
|
|
69
62
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: '
|
|
63
|
+
version: '1.2'
|
|
71
64
|
- !ruby/object:Gem::Dependency
|
|
72
|
-
name:
|
|
65
|
+
name: x25519
|
|
73
66
|
requirement: !ruby/object:Gem::Requirement
|
|
74
67
|
requirements:
|
|
75
|
-
- - "
|
|
68
|
+
- - ">="
|
|
76
69
|
- !ruby/object:Gem::Version
|
|
77
|
-
version: '
|
|
70
|
+
version: '0'
|
|
78
71
|
type: :development
|
|
79
72
|
prerelease: false
|
|
80
73
|
version_requirements: !ruby/object:Gem::Requirement
|
|
81
74
|
requirements:
|
|
82
|
-
- - "
|
|
75
|
+
- - ">="
|
|
83
76
|
- !ruby/object:Gem::Version
|
|
84
|
-
version: '
|
|
77
|
+
version: '0'
|
|
85
78
|
- !ruby/object:Gem::Dependency
|
|
86
79
|
name: bundler
|
|
87
80
|
requirement: !ruby/object:Gem::Requirement
|
|
88
81
|
requirements:
|
|
89
|
-
- - "
|
|
82
|
+
- - ">="
|
|
90
83
|
- !ruby/object:Gem::Version
|
|
91
|
-
version: '1.
|
|
84
|
+
version: '1.17'
|
|
92
85
|
type: :development
|
|
93
86
|
prerelease: false
|
|
94
87
|
version_requirements: !ruby/object:Gem::Requirement
|
|
95
88
|
requirements:
|
|
96
|
-
- - "
|
|
89
|
+
- - ">="
|
|
97
90
|
- !ruby/object:Gem::Version
|
|
98
|
-
version: '1.
|
|
91
|
+
version: '1.17'
|
|
99
92
|
- !ruby/object:Gem::Dependency
|
|
100
|
-
name:
|
|
93
|
+
name: minitest
|
|
101
94
|
requirement: !ruby/object:Gem::Requirement
|
|
102
95
|
requirements:
|
|
103
96
|
- - "~>"
|
|
104
97
|
- !ruby/object:Gem::Version
|
|
105
|
-
version: '
|
|
98
|
+
version: '5.10'
|
|
106
99
|
type: :development
|
|
107
100
|
prerelease: false
|
|
108
101
|
version_requirements: !ruby/object:Gem::Requirement
|
|
109
102
|
requirements:
|
|
110
103
|
- - "~>"
|
|
111
104
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: '
|
|
105
|
+
version: '5.10'
|
|
113
106
|
- !ruby/object:Gem::Dependency
|
|
114
|
-
name:
|
|
107
|
+
name: mocha
|
|
115
108
|
requirement: !ruby/object:Gem::Requirement
|
|
116
109
|
requirements:
|
|
117
110
|
- - "~>"
|
|
118
111
|
- !ruby/object:Gem::Version
|
|
119
|
-
version:
|
|
112
|
+
version: 1.11.2
|
|
120
113
|
type: :development
|
|
121
114
|
prerelease: false
|
|
122
115
|
version_requirements: !ruby/object:Gem::Requirement
|
|
123
116
|
requirements:
|
|
124
117
|
- - "~>"
|
|
125
118
|
- !ruby/object:Gem::Version
|
|
126
|
-
version:
|
|
119
|
+
version: 1.11.2
|
|
127
120
|
- !ruby/object:Gem::Dependency
|
|
128
|
-
name:
|
|
121
|
+
name: rake
|
|
129
122
|
requirement: !ruby/object:Gem::Requirement
|
|
130
123
|
requirements:
|
|
131
124
|
- - "~>"
|
|
132
125
|
- !ruby/object:Gem::Version
|
|
133
|
-
version:
|
|
126
|
+
version: '12.0'
|
|
134
127
|
type: :development
|
|
135
128
|
prerelease: false
|
|
136
129
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
130
|
requirements:
|
|
138
131
|
- - "~>"
|
|
139
132
|
- !ruby/object:Gem::Version
|
|
140
|
-
version:
|
|
133
|
+
version: '12.0'
|
|
141
134
|
- !ruby/object:Gem::Dependency
|
|
142
|
-
name:
|
|
135
|
+
name: rubocop
|
|
143
136
|
requirement: !ruby/object:Gem::Requirement
|
|
144
137
|
requirements:
|
|
145
|
-
- - "
|
|
138
|
+
- - "~>"
|
|
146
139
|
- !ruby/object:Gem::Version
|
|
147
|
-
version: 1.
|
|
140
|
+
version: 1.28.0
|
|
148
141
|
type: :development
|
|
149
142
|
prerelease: false
|
|
150
143
|
version_requirements: !ruby/object:Gem::Requirement
|
|
151
144
|
requirements:
|
|
152
|
-
- - "
|
|
145
|
+
- - "~>"
|
|
153
146
|
- !ruby/object:Gem::Version
|
|
154
|
-
version: 1.
|
|
147
|
+
version: 1.28.0
|
|
155
148
|
description: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It
|
|
156
149
|
allows you to write programs that invoke and interact with processes on remote servers,
|
|
157
150
|
via SSH2.'
|
|
@@ -161,23 +154,29 @@ executables: []
|
|
|
161
154
|
extensions: []
|
|
162
155
|
extra_rdoc_files:
|
|
163
156
|
- LICENSE.txt
|
|
164
|
-
- README.
|
|
157
|
+
- README.md
|
|
165
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"
|
|
166
164
|
- ".gitignore"
|
|
167
165
|
- ".rubocop.yml"
|
|
168
166
|
- ".rubocop_todo.yml"
|
|
169
|
-
- ".travis.yml"
|
|
170
167
|
- CHANGES.txt
|
|
168
|
+
- Dockerfile
|
|
169
|
+
- Dockerfile.openssl3
|
|
171
170
|
- Gemfile
|
|
172
|
-
- Gemfile.
|
|
173
|
-
- Gemfile.norbnacl.lock
|
|
171
|
+
- Gemfile.noed25519
|
|
174
172
|
- ISSUE_TEMPLATE.md
|
|
175
173
|
- LICENSE.txt
|
|
176
174
|
- Manifest
|
|
177
|
-
- README.
|
|
175
|
+
- README.md
|
|
178
176
|
- Rakefile
|
|
179
177
|
- THANKS.txt
|
|
180
178
|
- appveyor.yml
|
|
179
|
+
- docker-compose.yml
|
|
181
180
|
- lib/net/ssh.rb
|
|
182
181
|
- lib/net/ssh/authentication/agent.rb
|
|
183
182
|
- lib/net/ssh/authentication/certificate.rb
|
|
@@ -192,6 +191,7 @@ files:
|
|
|
192
191
|
- lib/net/ssh/authentication/methods/password.rb
|
|
193
192
|
- lib/net/ssh/authentication/methods/publickey.rb
|
|
194
193
|
- lib/net/ssh/authentication/pageant.rb
|
|
194
|
+
- lib/net/ssh/authentication/pub_key_fingerprint.rb
|
|
195
195
|
- lib/net/ssh/authentication/session.rb
|
|
196
196
|
- lib/net/ssh/buffer.rb
|
|
197
197
|
- lib/net/ssh/buffered_io.rb
|
|
@@ -215,7 +215,6 @@ files:
|
|
|
215
215
|
- lib/net/ssh/proxy/jump.rb
|
|
216
216
|
- lib/net/ssh/proxy/socks4.rb
|
|
217
217
|
- lib/net/ssh/proxy/socks5.rb
|
|
218
|
-
- lib/net/ssh/ruby_compat.rb
|
|
219
218
|
- lib/net/ssh/service/forward.rb
|
|
220
219
|
- lib/net/ssh/test.rb
|
|
221
220
|
- lib/net/ssh/test/channel.rb
|
|
@@ -240,11 +239,18 @@ files:
|
|
|
240
239
|
- lib/net/ssh/transport/hmac/sha1_96.rb
|
|
241
240
|
- lib/net/ssh/transport/hmac/sha2_256.rb
|
|
242
241
|
- lib/net/ssh/transport/hmac/sha2_256_96.rb
|
|
242
|
+
- lib/net/ssh/transport/hmac/sha2_256_etm.rb
|
|
243
243
|
- lib/net/ssh/transport/hmac/sha2_512.rb
|
|
244
244
|
- lib/net/ssh/transport/hmac/sha2_512_96.rb
|
|
245
|
+
- lib/net/ssh/transport/hmac/sha2_512_etm.rb
|
|
245
246
|
- lib/net/ssh/transport/identity_cipher.rb
|
|
246
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
|
|
247
252
|
- lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb
|
|
253
|
+
- lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb
|
|
248
254
|
- lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb
|
|
249
255
|
- lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb
|
|
250
256
|
- lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb
|
|
@@ -257,19 +263,19 @@ files:
|
|
|
257
263
|
- lib/net/ssh/transport/server_version.rb
|
|
258
264
|
- lib/net/ssh/transport/session.rb
|
|
259
265
|
- lib/net/ssh/transport/state.rb
|
|
260
|
-
- lib/net/ssh/verifiers/
|
|
261
|
-
- lib/net/ssh/verifiers/
|
|
262
|
-
- lib/net/ssh/verifiers/
|
|
263
|
-
- lib/net/ssh/verifiers/
|
|
266
|
+
- lib/net/ssh/verifiers/accept_new.rb
|
|
267
|
+
- lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb
|
|
268
|
+
- lib/net/ssh/verifiers/always.rb
|
|
269
|
+
- lib/net/ssh/verifiers/never.rb
|
|
264
270
|
- lib/net/ssh/version.rb
|
|
265
271
|
- net-ssh-public_cert.pem
|
|
266
272
|
- net-ssh.gemspec
|
|
267
|
-
- support/arcfour_check.rb
|
|
268
273
|
- support/ssh_tunnel_bug.rb
|
|
269
274
|
homepage: https://github.com/net-ssh/net-ssh
|
|
270
275
|
licenses:
|
|
271
276
|
- MIT
|
|
272
|
-
metadata:
|
|
277
|
+
metadata:
|
|
278
|
+
changelog_uri: https://github.com/net-ssh/net-ssh/blob/master/CHANGES.txt
|
|
273
279
|
post_install_message:
|
|
274
280
|
rdoc_options: []
|
|
275
281
|
require_paths:
|
|
@@ -278,15 +284,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
278
284
|
requirements:
|
|
279
285
|
- - ">="
|
|
280
286
|
- !ruby/object:Gem::Version
|
|
281
|
-
version: '2.
|
|
287
|
+
version: '2.6'
|
|
282
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
289
|
requirements:
|
|
284
290
|
- - ">="
|
|
285
291
|
- !ruby/object:Gem::Version
|
|
286
292
|
version: '0'
|
|
287
293
|
requirements: []
|
|
288
|
-
|
|
289
|
-
rubygems_version: 2.6.10
|
|
294
|
+
rubygems_version: 3.1.6
|
|
290
295
|
signing_key:
|
|
291
296
|
specification_version: 4
|
|
292
297
|
summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
|
metadata.gz.sig
CHANGED
|
Binary file
|