net-ssh 2.6.1 → 2.6.2
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.
- data/README.rdoc +14 -0
- data/lib/net/ssh.rb +2 -1
- data/lib/net/ssh/test/channel.rb +9 -0
- data/lib/net/ssh/test/kex.rb +1 -1
- data/lib/net/ssh/test/packet.rb +1 -0
- data/lib/net/ssh/test/script.rb +9 -0
- data/lib/net/ssh/version.rb +1 -1
- data/net-ssh.gemspec +1 -1
- data/test/README.txt +7 -3
- data/test/test_all.rb +2 -0
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -90,6 +90,20 @@ Lastly, if you want to run the tests or use any of the Rake tasks, you'll need:
|
|
90
90
|
|
91
91
|
NOTE: If you are running on jruby you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies).
|
92
92
|
|
93
|
+
== RUBY 1.8 SUPPORT
|
94
|
+
|
95
|
+
net-ssh supports Ruby 1.8.x up until the 2.5.1 release. Later releases will work but the test suite is no longer guaranteed to pass all tests.
|
96
|
+
|
97
|
+
== JRUBY 1.6
|
98
|
+
|
99
|
+
There is an issue with jruby-openssl that produces the following error in jruby 1.6:
|
100
|
+
|
101
|
+
<ArgumentError> wrong number of arguments (2 for 1)
|
102
|
+
/home/offers/tracking/shared/bundle/jruby/1.8/gems/net-ssh-2.6.0/lib/net/ssh/key_factory.rb:77:in `load_data_private_key'
|
103
|
+
|
104
|
+
You can downgrade jruby-openssl to version 0.7.4 (before they added the PKey.read method) to resolve it or upgrade jruby to 1.7. See issue #61 for more info: https://github.com/net-ssh/net-ssh/issues/61.
|
105
|
+
|
106
|
+
|
93
107
|
== ARCFOUR SUPPORT:
|
94
108
|
|
95
109
|
from Karl Varga:
|
data/lib/net/ssh.rb
CHANGED
@@ -190,8 +190,9 @@ module Net
|
|
190
190
|
if auth.authenticate("ssh-connection", user, options[:password])
|
191
191
|
connection = Connection::Session.new(transport, options)
|
192
192
|
if block_given?
|
193
|
-
yield connection
|
193
|
+
retval = yield connection
|
194
194
|
connection.close
|
195
|
+
retval
|
195
196
|
else
|
196
197
|
return connection
|
197
198
|
end
|
data/lib/net/ssh/test/channel.rb
CHANGED
@@ -10,6 +10,7 @@ module Net; module SSH; module Test
|
|
10
10
|
# channel = session.opens_channel
|
11
11
|
# channel.sends_exec "ls"
|
12
12
|
# channel.gets_data "result of ls"
|
13
|
+
# channel.gets_extended_data "some error coming from ls"
|
13
14
|
# channel.gets_close
|
14
15
|
# channel.sends_close
|
15
16
|
# end
|
@@ -104,6 +105,14 @@ module Net; module SSH; module Test
|
|
104
105
|
script.gets_channel_data(self, data)
|
105
106
|
end
|
106
107
|
|
108
|
+
# Scripts the reception of a channel extended data packet from the remote
|
109
|
+
# end.
|
110
|
+
#
|
111
|
+
# channel.gets_extended_data "whoops"
|
112
|
+
def gets_extended_data(data)
|
113
|
+
script.gets_channel_extended_data(self, data)
|
114
|
+
end
|
115
|
+
|
107
116
|
# Scripts the reception of an "exit-status" channel request packet.
|
108
117
|
#
|
109
118
|
# channel.gets_exit_status(127)
|
data/lib/net/ssh/test/kex.rb
CHANGED
@@ -32,7 +32,7 @@ module Net; module SSH; module Test
|
|
32
32
|
raise Net::SSH::Exception, "expected NEWKEYS" unless buffer.type == NEWKEYS
|
33
33
|
|
34
34
|
{ :session_id => "abc-xyz",
|
35
|
-
:server_key => OpenSSL::PKey::RSA.new(
|
35
|
+
:server_key => OpenSSL::PKey::RSA.new(512),
|
36
36
|
:shared_secret => OpenSSL::BN.new("1234567890", 10),
|
37
37
|
:hashing_algorithm => OpenSSL::Digest::SHA1 }
|
38
38
|
end
|
data/lib/net/ssh/test/packet.rb
CHANGED
@@ -65,6 +65,7 @@ module Net; module SSH; module Test
|
|
65
65
|
when CHANNEL_OPEN then [:string, :long, :long, :long]
|
66
66
|
when CHANNEL_OPEN_CONFIRMATION then [:long, :long, :long, :long]
|
67
67
|
when CHANNEL_DATA then [:long, :string]
|
68
|
+
when CHANNEL_EXTENDED_DATA then [:long, :long, :string]
|
68
69
|
when CHANNEL_EOF, CHANNEL_CLOSE, CHANNEL_SUCCESS, CHANNEL_FAILURE then [:long]
|
69
70
|
when CHANNEL_REQUEST
|
70
71
|
parts = [:long, :string, :bool]
|
data/lib/net/ssh/test/script.rb
CHANGED
@@ -111,6 +111,15 @@ module Net; module SSH; module Test
|
|
111
111
|
events << RemotePacket.new(:channel_data, channel.local_id, data)
|
112
112
|
end
|
113
113
|
|
114
|
+
# Scripts the reception of a channel extended data packet from the remote
|
115
|
+
# host by the given Net::SSH::Test::Channel +channel+. This will typically
|
116
|
+
# be called via Net::SSH::Test::Channel#gets_extended_data.
|
117
|
+
#
|
118
|
+
# Currently the only extended data type is stderr == 1.
|
119
|
+
def gets_channel_extended_data(channel, data)
|
120
|
+
events << RemotePacket.new(:channel_extended_data, channel.local_id, 1, data)
|
121
|
+
end
|
122
|
+
|
114
123
|
# Scripts the reception of a channel request packet from the remote host by
|
115
124
|
# the given Net::SSH::Test::Channel +channel+. This will typically be
|
116
125
|
# called via Net::SSH::Test::Channel#gets_exit_status.
|
data/lib/net/ssh/version.rb
CHANGED
data/net-ssh.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2"
|
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"]
|
data/test/README.txt
CHANGED
@@ -13,11 +13,15 @@ Run a single test file like this:
|
|
13
13
|
|
14
14
|
EXPECTED RESULTS
|
15
15
|
|
16
|
-
* Ruby 1.8: all tests pass
|
17
|
-
|
18
16
|
* Ruby 1.9: all tests pass
|
19
17
|
|
20
|
-
*
|
18
|
+
* Ruby 1.8: all tests pass (up until version 2.5)
|
19
|
+
|
20
|
+
* JRuby 1.7: 98% test pass (510 tests, 1914 assertions, 2 failures, 9 errors)
|
21
|
+
|
22
|
+
* JRuby 1.6: 98% test pass (510 tests, 1914 assertions, 4 failures, 5 errors)
|
23
|
+
|
24
|
+
* JRuby 1.5: 98% tests pass (510 tests, 1914 assertions, 5 failures, 5 errors)
|
21
25
|
|
22
26
|
|
23
27
|
PORT FORWARDING TESTS
|
data/test/test_all.rb
CHANGED
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.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-22 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: ! 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.
|
16
16
|
It allows you to write programs that invoke and interact with processes on remote
|