net-ssh 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +20 -1
- data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +1 -1
- data/lib/net/ssh/authentication/session.rb +2 -2
- data/lib/net/ssh/buffer.rb +1 -1
- data/lib/net/ssh/key_factory.rb +2 -2
- data/lib/net/ssh/service/forward.rb +1 -1
- data/lib/net/ssh/transport/algorithms.rb +1 -1
- data/lib/net/ssh/transport/key_expander.rb +1 -1
- data/lib/net/ssh/transport/openssl.rb +1 -1
- data/lib/net/ssh/transport/packet_stream.rb +5 -2
- data/lib/net/ssh/transport/server_version.rb +1 -1
- data/lib/net/ssh/version.rb +1 -1
- data/net-ssh.gemspec +8 -5
- data/test/common.rb +2 -1
- metadata +25 -3
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,23 @@
|
|
1
1
|
|
2
|
+
=== 2.6.3 / 10 Jan 2013
|
3
|
+
|
4
|
+
* Small doc fix and correct error class for PKey::EC key type [Andreas Wolff]
|
5
|
+
* Improve test dependencies [Kenichi Kamiya]
|
6
|
+
|
7
|
+
|
8
|
+
=== 2.6.2 / 22 Nov 2012
|
9
|
+
|
10
|
+
* Net::SSH.start now returns result of block [mhuffnagle]
|
11
|
+
* Add stderr handling to Net::SSH::Test [ohrite]
|
12
|
+
* Fix Invalid key size in JRuby [ohrite]
|
13
|
+
|
14
|
+
|
15
|
+
=== 2.6.1 / 18 Oct 2012
|
16
|
+
|
17
|
+
* Remove platform specific jruby dependency from gemspec
|
18
|
+
* Changed encoding of file to prevent warnings when generating docs [iltempo]
|
19
|
+
|
20
|
+
|
2
21
|
=== 2.6.0 / 19 Sep 2012
|
3
22
|
|
4
23
|
* Use OpenSSL::PKey.read to read arbitrary private key. [nagachika]
|
@@ -10,7 +29,7 @@
|
|
10
29
|
|
11
30
|
=== 2.5.2 / 25 May 2012
|
12
31
|
|
13
|
-
* Fix for Net::SSH::KnownHosts::SUPPORTED_TYPE [Marco Sandrini]
|
32
|
+
* Fix for Net::SSH::KnownHosts::SUPPORTED_TYPE [Marco Sandrini]
|
14
33
|
|
15
34
|
=== 2.5.1 / 24 May 2012
|
16
35
|
|
@@ -54,7 +54,7 @@ module Net; module SSH; module Authentication
|
|
54
54
|
debug { "beginning authentication of `#{username}'" }
|
55
55
|
|
56
56
|
transport.send_message(transport.service_request("ssh-userauth"))
|
57
|
-
|
57
|
+
expect_message(SERVICE_ACCEPT)
|
58
58
|
|
59
59
|
key_manager = KeyManager.new(logger, options)
|
60
60
|
keys.each { |key| key_manager.add(key) } unless keys.empty?
|
@@ -70,7 +70,7 @@ module Net; module SSH; module Authentication
|
|
70
70
|
debug { "trying #{name}" }
|
71
71
|
begin
|
72
72
|
method = Methods.const_get(name.split(/\W+/).map { |p| p.capitalize }.join).new(self, :key_manager => key_manager)
|
73
|
-
rescue NameError
|
73
|
+
rescue NameError
|
74
74
|
debug{"Mechanism #{name} was requested, but isn't a known type. Ignoring it."}
|
75
75
|
next
|
76
76
|
end
|
data/lib/net/ssh/buffer.rb
CHANGED
data/lib/net/ssh/key_factory.rb
CHANGED
@@ -61,7 +61,7 @@ module Net; module SSH
|
|
61
61
|
error_class = OpenSSL::PKey::RSAError
|
62
62
|
elsif data.match(/-----BEGIN EC PRIVATE KEY-----/) && defined?(OpenSSL::PKey::EC)
|
63
63
|
key_type = OpenSSL::PKey::EC
|
64
|
-
error_class = OpenSSL::PKey::
|
64
|
+
error_class = OpenSSL::PKey::ECError
|
65
65
|
elsif data.match(/-----BEGIN (.+) PRIVATE KEY-----/)
|
66
66
|
raise OpenSSL::PKey::PKeyError, "not a supported key type '#{$1}'"
|
67
67
|
else
|
@@ -105,7 +105,7 @@ module Net; module SSH
|
|
105
105
|
# the file describes an RSA or DSA key, and will load it
|
106
106
|
# appropriately. The new public key is returned.
|
107
107
|
def load_data_public_key(data, filename="")
|
108
|
-
|
108
|
+
_, blob = data.split(/ /)
|
109
109
|
|
110
110
|
raise Net::SSH::Exception, "public key at #{filename} is not valid" if blob.nil?
|
111
111
|
|
@@ -177,7 +177,7 @@ module Net; module SSH; module Service
|
|
177
177
|
# time a session channel is opened, when the connection was created with
|
178
178
|
# :forward_agent set to true:
|
179
179
|
#
|
180
|
-
# Net::SSH.start("remote.host", "me", :
|
180
|
+
# Net::SSH.start("remote.host", "me", :forward_agent => true) do |ssh|
|
181
181
|
# ssh.open_channel do |ch|
|
182
182
|
# # agent will be automatically forwarded by this point
|
183
183
|
# end
|
@@ -263,7 +263,7 @@ module Net; module SSH; module Transport
|
|
263
263
|
# TODO: if first_kex_packet_follows, we need to try to skip the
|
264
264
|
# actual kexinit stuff and try to guess what the server is doing...
|
265
265
|
# need to read more about this scenario.
|
266
|
-
first_kex_packet_follows = packet.read_bool
|
266
|
+
# first_kex_packet_follows = packet.read_bool
|
267
267
|
|
268
268
|
return data
|
269
269
|
end
|
@@ -82,7 +82,11 @@ module Net; module SSH; module Transport
|
|
82
82
|
def next_packet(mode=:nonblock)
|
83
83
|
case mode
|
84
84
|
when :nonblock then
|
85
|
-
|
85
|
+
if available_for_read?
|
86
|
+
if fill <= 0
|
87
|
+
raise Net::SSH::Disconnect, "connection closed by remote host"
|
88
|
+
end
|
89
|
+
end
|
86
90
|
poll_next_packet
|
87
91
|
|
88
92
|
when :block then
|
@@ -215,7 +219,6 @@ module Net; module SSH; module Transport
|
|
215
219
|
padding_length = @packet.read_byte
|
216
220
|
|
217
221
|
payload = @packet.read(@packet_length - padding_length - 1)
|
218
|
-
padding = @packet.read(padding_length) if padding_length > 0
|
219
222
|
|
220
223
|
my_computed_hmac = server.hmac.digest([server.sequence_number, @packet.content].pack("NA*"))
|
221
224
|
raise Net::SSH::Exception, "corrupted mac detected" if real_hmac != my_computed_hmac
|
@@ -46,7 +46,7 @@ module Net; module SSH; module Transport
|
|
46
46
|
begin
|
47
47
|
b = socket.readpartial(1)
|
48
48
|
raise Net::SSH::Disconnect, "connection closed by remote host" if b.nil?
|
49
|
-
rescue EOFError
|
49
|
+
rescue EOFError
|
50
50
|
raise Net::SSH::Disconnect, "connection closed by remote host"
|
51
51
|
end
|
52
52
|
@version << b
|
data/lib/net/ssh/version.rb
CHANGED
data/net-ssh.gemspec
CHANGED
@@ -1,27 +1,30 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "net-ssh"
|
3
3
|
s.rubyforge_project = 'net-ssh'
|
4
|
-
s.version = "2.6.
|
4
|
+
s.version = "2.6.3"
|
5
5
|
s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
|
6
6
|
s.description = s.summary + " It allows you to write programs that invoke and interact with processes on remote servers, via SSH2."
|
7
7
|
s.authors = ["Jamis Buck", "Delano Mandelbaum"]
|
8
8
|
s.email = ["net-ssh@solutious.com"]
|
9
9
|
s.homepage = "http://github.com/net-ssh/net-ssh"
|
10
|
-
|
10
|
+
|
11
11
|
s.extra_rdoc_files = %w[README.rdoc THANKS.rdoc CHANGELOG.rdoc]
|
12
12
|
s.has_rdoc = true
|
13
13
|
s.rdoc_options = ["--line-numbers", "--title", s.summary, "--main", "README.rdoc"]
|
14
14
|
s.require_paths = %w[lib]
|
15
15
|
s.rubygems_version = '1.3.2'
|
16
|
-
|
16
|
+
|
17
17
|
# Note: this is run at package time not install time so if you are
|
18
18
|
# running on jruby, you need to install jruby-pageant manually.
|
19
19
|
if RUBY_PLATFORM == "java"
|
20
20
|
s.add_dependency 'jruby-pageant', ">=1.1.1"
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
|
+
s.add_development_dependency 'test-unit'
|
24
|
+
s.add_development_dependency 'mocha'
|
25
|
+
|
23
26
|
s.executables = %w[]
|
24
|
-
|
27
|
+
|
25
28
|
# = MANIFEST =
|
26
29
|
s.files = %w(
|
27
30
|
CHANGELOG.rdoc
|
data/test/common.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
|
2
2
|
gem "test-unit" # http://rubyforge.org/pipermail/test-unit-tracker/2009-July/000075.html
|
3
|
+
gem 'mocha'
|
3
4
|
require 'test/unit'
|
4
|
-
require 'mocha'
|
5
|
+
require 'mocha/setup'
|
5
6
|
require 'net/ssh/buffer'
|
6
7
|
require 'net/ssh/config'
|
7
8
|
require 'net/ssh/loggable'
|
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: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,8 +10,30 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
dependencies:
|
13
|
+
date: 2013-01-10 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: test-unit
|
17
|
+
requirement: &70335346122740 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *70335346122740
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: mocha
|
28
|
+
requirement: &70335346119640 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70335346119640
|
15
37
|
description: ! 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.
|
16
38
|
It allows you to write programs that invoke and interact with processes on remote
|
17
39
|
servers, via SSH2.'
|