net-ssh 8.0.0 → 8.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGES.txt +5 -0
- data/lib/net/ssh/multiplex.rb +8 -12
- data/lib/net/ssh/transport/session.rb +2 -1
- data/lib/net/ssh/version.rb +1 -1
- data/lib/net/ssh.rb +12 -11
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b548f463639f7a9a85eca15cc065ab99d7b3c803330733198f311eb46cbc3c13
|
|
4
|
+
data.tar.gz: 56dd051e3ff6346e4f5684c571d1136978314762b2eb2a248af00666c4ab136f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2d469ea5e169da065852011e64ecc4c30168baac60f4b241014ec1b7c1d76512e95163f726858f94cbaf722578fd0acddacfd446f31d4dfb65faafd62c97f1d
|
|
7
|
+
data.tar.gz: 3582df1af6a3686ff510d86268730c6eecb5104ddcc239cfe31c324940b3a57d6522fe74c1b8cde2e42385167ee57958c669284032d39eda947ddfa1b8fc6c43
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGES.txt
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
=== 8.0.1
|
|
2
|
+
|
|
3
|
+
* Fixed `unexpected packet type 94 during initial key exchange` (or 93) when channel data arrives during a client-initiated re-key, which broke bulk transfers at the first re-key (e.g. with `rekey_limit`, or after about 1 GB); a regression in 8.0.0 [#1063]
|
|
4
|
+
* `control_master: :auto` now ignores `forward_agent` (logged at info level) instead of raising ArgumentError, and logs the ignored connection options at info instead of warn level, so it works with sshkit (Kamal, Capistrano), which always passes `forward_agent: true`, `keys`, `known_hosts` and `keepalive` [#1062]
|
|
5
|
+
|
|
1
6
|
=== 8.0.0
|
|
2
7
|
|
|
3
8
|
* No changes since 8.0.0 rc5.
|
data/lib/net/ssh/multiplex.rb
CHANGED
|
@@ -32,13 +32,9 @@ module Net
|
|
|
32
32
|
VALUES = [:auto, false, nil].freeze
|
|
33
33
|
|
|
34
34
|
def self.validate_options!(options)
|
|
35
|
-
|
|
36
|
-
raise ArgumentError, "control_master must be :auto or false, got #{options[:control_master].inspect}"
|
|
37
|
-
end
|
|
38
|
-
return unless options[:control_master] && options[:forward_agent]
|
|
35
|
+
return if VALUES.include?(options[:control_master])
|
|
39
36
|
|
|
40
|
-
raise ArgumentError, "
|
|
41
|
-
"from its own agent only if it has ForwardAgent enabled itself, and rejects them otherwise"
|
|
37
|
+
raise ArgumentError, "control_master must be :auto or false, got #{options[:control_master].inspect}"
|
|
42
38
|
end
|
|
43
39
|
|
|
44
40
|
# Returns a Connection::Session running through the ControlMaster for
|
|
@@ -55,7 +51,7 @@ module Net
|
|
|
55
51
|
return nil unless socket
|
|
56
52
|
|
|
57
53
|
logger.info { "control_master: using ControlMaster at #{path}" }
|
|
58
|
-
|
|
54
|
+
log_master_owned(logger, explicit)
|
|
59
55
|
begin
|
|
60
56
|
transport = ProxyTransport.new(socket, host: host, control_path: path, options: options)
|
|
61
57
|
Connection::Session.new(transport, session_options(logger, options))
|
|
@@ -108,23 +104,23 @@ module Net
|
|
|
108
104
|
ControlPath.jump_host(proxy.jump_proxies)
|
|
109
105
|
end
|
|
110
106
|
|
|
111
|
-
def self.
|
|
107
|
+
def self.log_master_owned(logger, explicit)
|
|
112
108
|
bypassed = explicit & MASTER_OWNED_OPTIONS
|
|
113
109
|
return if bypassed.empty?
|
|
114
110
|
|
|
115
|
-
logger.
|
|
111
|
+
logger.info { "control_master: ignoring #{bypassed.join(', ')}, the ControlMaster's own settings apply" }
|
|
116
112
|
end
|
|
117
113
|
|
|
118
114
|
# Keepalive is a global request, which the master doesn't allow; it
|
|
119
|
-
# watches its own connection anyway.
|
|
120
|
-
#
|
|
115
|
+
# watches its own connection anyway. The master serves agent requests
|
|
116
|
+
# from its own agent only if it has ForwardAgent enabled itself.
|
|
121
117
|
def self.session_options(logger, options)
|
|
122
118
|
logger.info { "control_master: keepalive is left to the ControlMaster" } if options[:keepalive]
|
|
123
119
|
logger.info { "control_master: ignoring ForwardAgent, the ControlMaster's own ForwardAgent setting applies" } if options[:forward_agent]
|
|
124
120
|
options.merge(keepalive: false, forward_agent: false)
|
|
125
121
|
end
|
|
126
122
|
|
|
127
|
-
private_class_method :open_proxy, :socket_path, :jump_host, :
|
|
123
|
+
private_class_method :open_proxy, :socket_path, :jump_host, :log_master_owned, :session_options
|
|
128
124
|
end
|
|
129
125
|
end
|
|
130
126
|
end
|
|
@@ -228,7 +228,8 @@ module Net
|
|
|
228
228
|
|
|
229
229
|
else
|
|
230
230
|
return packet if algorithms.allow?(packet)
|
|
231
|
-
|
|
231
|
+
# Algorithms#rekey! clears initialized?, so the session id is what marks the first key exchange as done.
|
|
232
|
+
raise Net::SSH::Exception, "unexpected packet type #{packet.type} during initial key exchange" unless algorithms.session_id
|
|
232
233
|
|
|
233
234
|
push(packet)
|
|
234
235
|
end
|
data/lib/net/ssh/version.rb
CHANGED
data/lib/net/ssh.rb
CHANGED
|
@@ -125,21 +125,21 @@ module Net
|
|
|
125
125
|
# for setting up a connection (:keys, :key_data, :password, :passphrase,
|
|
126
126
|
# :auth_methods, :verify_host_key, :known_hosts, :host_key, :kex,
|
|
127
127
|
# :encryption, :hmac, :compression, :rekey_*, :proxy, :keepalive and the
|
|
128
|
-
# like); explicitly passed ones are named
|
|
128
|
+
# like); explicitly passed ones are named at info level. Over the
|
|
129
129
|
# master, remote port forwarding (Service::Forward#remote and
|
|
130
130
|
# #cancel_remote) raises Net::SSH::NotSupportedOverControlMaster, as the
|
|
131
131
|
# master consumes the global request reply, so success, failure and the
|
|
132
132
|
# port allocated for port 0 can't be observed; other global requests
|
|
133
133
|
# raise it too. Agent and X11 forwarding requests raise it
|
|
134
|
-
# too, and :forward_agent
|
|
135
|
-
# serves them from its own agent or display only if it has
|
|
136
|
-
# or ForwardX11 enabled itself, and rejects them otherwise.
|
|
137
|
-
# rekeying are left to the master. ssh_config's
|
|
138
|
-
# ignored, only this option enables it. An invalid
|
|
139
|
-
# ArgumentError. A missing or stale socket is logged
|
|
140
|
-
# socket that can't be used (another owner, refused,
|
|
141
|
-
# timed out) at warn level. Has no effect on Windows.
|
|
142
|
-
# +false+.
|
|
134
|
+
# too, and :forward_agent is ignored (logged at info level), because the
|
|
135
|
+
# master serves them from its own agent or display only if it has
|
|
136
|
+
# ForwardAgent or ForwardX11 enabled itself, and rejects them otherwise.
|
|
137
|
+
# Keepalive and rekeying are left to the master. ssh_config's
|
|
138
|
+
# ControlMaster is ignored, only this option enables it. An invalid
|
|
139
|
+
# ControlPath raises ArgumentError. A missing or stale socket is logged
|
|
140
|
+
# at info level, a socket that can't be used (another owner, refused,
|
|
141
|
+
# wrong protocol, timed out) at warn level. Has no effect on Windows.
|
|
142
|
+
# Defaults to +false+.
|
|
143
143
|
# * :control_path => the ControlMaster socket to use with
|
|
144
144
|
# :control_master, with the same ~, ${ENV} and % tokens as ssh_config's
|
|
145
145
|
# ControlPath (%C, %d, %h, %i, %j, %k, %L, %l, %n, %p, %r, %u, %%).
|
|
@@ -154,7 +154,8 @@ module Net
|
|
|
154
154
|
# files. Defaults to +true+.
|
|
155
155
|
# * :encryption => the encryption cipher (or ciphers) to use
|
|
156
156
|
# * :forward_agent => set to true if you want the SSH agent connection to
|
|
157
|
-
# be forwarded
|
|
157
|
+
# be forwarded. Ignored for a session through a ControlMaster (see
|
|
158
|
+
# :control_master).
|
|
158
159
|
# * :known_hosts => a custom object holding known hosts records.
|
|
159
160
|
# It must implement #search_for and `add` in a similiar manner as KnownHosts.
|
|
160
161
|
# * :global_known_hosts_file => the location of the global known hosts
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|