net-ssh 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/manual-html/chapter-1.html +388 -0
- data/doc/manual-html/chapter-2.html +541 -0
- data/doc/manual-html/chapter-3.html +470 -0
- data/doc/manual-html/chapter-4.html +413 -0
- data/doc/manual-html/chapter-5.html +525 -0
- data/doc/manual-html/chapter-6.html +456 -0
- data/doc/manual-html/chapter-7.html +343 -0
- data/doc/manual-html/index.html +235 -0
- data/doc/manual-html/stylesheets/manual.css +270 -0
- data/doc/manual-html/stylesheets/ruby.css +17 -0
- data/lib/net/ssh/connection/driver.rb +25 -10
- data/lib/net/ssh/service/shell/sync.rb +1 -1
- data/lib/net/ssh/session.rb +6 -1
- data/lib/net/ssh/transport/packet-stream.rb +1 -1
- data/lib/net/ssh/transport/session.rb +2 -0
- data/lib/net/ssh/version.rb +1 -1
- metadata +16 -3
@@ -0,0 +1,270 @@
|
|
1
|
+
body {
|
2
|
+
background: #FFF;
|
3
|
+
font-family: sans-serif;
|
4
|
+
color: #000;
|
5
|
+
margin: 0px;
|
6
|
+
}
|
7
|
+
|
8
|
+
a {
|
9
|
+
color: #00F;
|
10
|
+
text-decoration: none;
|
11
|
+
}
|
12
|
+
|
13
|
+
a:hover {
|
14
|
+
text-decoration: underline;
|
15
|
+
}
|
16
|
+
|
17
|
+
.product-manual {
|
18
|
+
text-align: center;
|
19
|
+
font-size: x-large;
|
20
|
+
font-variant: small-caps;
|
21
|
+
font-weight: bold;
|
22
|
+
color: #005;
|
23
|
+
}
|
24
|
+
|
25
|
+
.copyright {
|
26
|
+
text-align: center;
|
27
|
+
font-size: small;
|
28
|
+
font-style: italic;
|
29
|
+
color: #005;
|
30
|
+
margin-top: 1in;
|
31
|
+
}
|
32
|
+
|
33
|
+
#banner {
|
34
|
+
background: #005;
|
35
|
+
color: #FFF;
|
36
|
+
border-bottom: 1px solid #000;
|
37
|
+
padding-top: 0.5em;
|
38
|
+
padding-bottom: 0.5em;
|
39
|
+
padding-left: 1em;
|
40
|
+
margin-bottom: 1em;
|
41
|
+
}
|
42
|
+
|
43
|
+
#banner .title {
|
44
|
+
font-size: x-large;
|
45
|
+
}
|
46
|
+
|
47
|
+
#banner .title:first-letter {
|
48
|
+
font-size: 250%;
|
49
|
+
font-weight: normal;
|
50
|
+
float: left;
|
51
|
+
margin-top: -7px;
|
52
|
+
margin-bottom: -7px;
|
53
|
+
}
|
54
|
+
|
55
|
+
#banner .product {
|
56
|
+
font-weight: bold;
|
57
|
+
color: #FF7;
|
58
|
+
letter-spacing: 0.5em;
|
59
|
+
}
|
60
|
+
|
61
|
+
#banner .tagline {
|
62
|
+
font-style: italic;
|
63
|
+
font-size: large;
|
64
|
+
letter-spacing: 0.1em;
|
65
|
+
color: #FFF;
|
66
|
+
}
|
67
|
+
|
68
|
+
#banner .info {
|
69
|
+
color: white;
|
70
|
+
font-size: small;
|
71
|
+
padding-right: 1em;
|
72
|
+
}
|
73
|
+
|
74
|
+
#content {
|
75
|
+
margin-left: 0cm;
|
76
|
+
margin-right: 1cm;
|
77
|
+
}
|
78
|
+
|
79
|
+
#navigation {
|
80
|
+
font-size: x-small;
|
81
|
+
border-right: 2px groove black;
|
82
|
+
border-top: 2px groove black;
|
83
|
+
margin-right: 1em;
|
84
|
+
width: 200px;
|
85
|
+
height: 100%;
|
86
|
+
background: #FFD;
|
87
|
+
}
|
88
|
+
|
89
|
+
#navigation ul, #navigation ol {
|
90
|
+
margin-left: 1.2em;
|
91
|
+
padding-left: 1.2em;
|
92
|
+
}
|
93
|
+
|
94
|
+
#navigation .license {
|
95
|
+
font-size: x-small;
|
96
|
+
text-align: center;
|
97
|
+
border-top: 1px dashed #005;
|
98
|
+
margin-top: 2em;
|
99
|
+
padding: 1em;
|
100
|
+
}
|
101
|
+
|
102
|
+
.section {
|
103
|
+
margin-bottom: 1em;
|
104
|
+
}
|
105
|
+
|
106
|
+
.section p {
|
107
|
+
text-align: justify;
|
108
|
+
}
|
109
|
+
|
110
|
+
#content h1 {
|
111
|
+
background: #005;
|
112
|
+
color: #FFF;
|
113
|
+
font-size: x-large;
|
114
|
+
font-weight: bold;
|
115
|
+
font-variant: small-caps;
|
116
|
+
padding: 0.5em;
|
117
|
+
border: 1px solid #000;
|
118
|
+
margin-top: 0px;
|
119
|
+
margin-bottom: 1em;
|
120
|
+
}
|
121
|
+
|
122
|
+
#content h2 {
|
123
|
+
background: #005;
|
124
|
+
color: #FFF;
|
125
|
+
font-size: large;
|
126
|
+
font-weight: bold;
|
127
|
+
font-variant: small-caps;
|
128
|
+
padding: 0.25em;
|
129
|
+
padding-left: 0.5em;
|
130
|
+
border: 1px solid #000;
|
131
|
+
margin-bottom: 1em;
|
132
|
+
}
|
133
|
+
|
134
|
+
#content h3 {
|
135
|
+
background: #FFD;
|
136
|
+
color: #000;
|
137
|
+
font-size: normal;
|
138
|
+
font-weight: bold;
|
139
|
+
font-variant: small-caps;
|
140
|
+
padding: 0.25em;
|
141
|
+
padding-left: 0.5em;
|
142
|
+
border: 1px dotted #000;
|
143
|
+
margin-bottom: 1em;
|
144
|
+
}
|
145
|
+
|
146
|
+
#content h4 {
|
147
|
+
background: #FFE;
|
148
|
+
color: #000;
|
149
|
+
font-size: normal;
|
150
|
+
font-weight: bold;
|
151
|
+
font-variant: small-caps;
|
152
|
+
padding: 0.25em;
|
153
|
+
padding-left: 0.5em;
|
154
|
+
border: 1px dotted #777;
|
155
|
+
margin-bottom: 1em;
|
156
|
+
}
|
157
|
+
|
158
|
+
#navigation h1 {
|
159
|
+
margin: 0px;
|
160
|
+
padding: 1em;
|
161
|
+
color: #005;
|
162
|
+
background: transparent;
|
163
|
+
font-weight: bold;
|
164
|
+
font-size: 150%;
|
165
|
+
font-variant: small-caps;
|
166
|
+
text-align: center;
|
167
|
+
}
|
168
|
+
|
169
|
+
#navigation h2 {
|
170
|
+
margin: 0px;
|
171
|
+
margin-bottom: 1em;
|
172
|
+
padding: 0.5em;
|
173
|
+
border-top: 1px dashed #005;
|
174
|
+
border-bottom: 1px dashed #005;
|
175
|
+
color: #005;
|
176
|
+
background: transparent;
|
177
|
+
font-weight: bold;
|
178
|
+
font-size: 125%;
|
179
|
+
font-variant: small-caps;
|
180
|
+
text-align: center;
|
181
|
+
}
|
182
|
+
|
183
|
+
table.list {
|
184
|
+
margin: 2em;
|
185
|
+
border: 1px solid black;
|
186
|
+
background: #FFD;
|
187
|
+
padding: 0px;
|
188
|
+
border-spacing: 0px;
|
189
|
+
}
|
190
|
+
|
191
|
+
table.list th {
|
192
|
+
border-bottom: 1px solid #005;
|
193
|
+
padding-bottom: 5px;
|
194
|
+
background: #008;
|
195
|
+
color: white;
|
196
|
+
padding: 0.5em;
|
197
|
+
text-align: left;
|
198
|
+
}
|
199
|
+
|
200
|
+
table.list td {
|
201
|
+
padding: 0.2em;
|
202
|
+
text-align: left;
|
203
|
+
vertical-align: top;
|
204
|
+
border-bottom: 1px solid;
|
205
|
+
}
|
206
|
+
|
207
|
+
.prevnext {
|
208
|
+
padding: 0.5em 1em 0.5em 1em;
|
209
|
+
background: #557;
|
210
|
+
color: #FFF;
|
211
|
+
font-size: small;
|
212
|
+
font-weight: bold;
|
213
|
+
border: 1px solid #000;
|
214
|
+
}
|
215
|
+
|
216
|
+
.prevnext a {
|
217
|
+
color: #FF0;
|
218
|
+
}
|
219
|
+
|
220
|
+
.top .prevnext {
|
221
|
+
margin: 0 0 1em 0;
|
222
|
+
text-align: left;
|
223
|
+
}
|
224
|
+
|
225
|
+
.bottom .prevnext {
|
226
|
+
margin: 1em 0 0 0;
|
227
|
+
text-align: right;
|
228
|
+
}
|
229
|
+
|
230
|
+
.figure {
|
231
|
+
border: 1px solid black;
|
232
|
+
line-height: normal;
|
233
|
+
background: #FFD;
|
234
|
+
margin: 2em;
|
235
|
+
}
|
236
|
+
|
237
|
+
.figure .caption {
|
238
|
+
background: #008;
|
239
|
+
color: white;
|
240
|
+
font-weight: bold;
|
241
|
+
font-size: small;
|
242
|
+
padding: 4px 24px 4px 8px;
|
243
|
+
margin-left: -4px;
|
244
|
+
border: 1px dotted #77F;
|
245
|
+
}
|
246
|
+
|
247
|
+
.figure table {
|
248
|
+
padding-top: 0.8em;
|
249
|
+
padding-bottom: 0.5em;
|
250
|
+
}
|
251
|
+
|
252
|
+
.figure .body {
|
253
|
+
padding-left: 1em;
|
254
|
+
}
|
255
|
+
|
256
|
+
.figure pre {
|
257
|
+
padding: 0px;
|
258
|
+
background: transparent;
|
259
|
+
border: none;
|
260
|
+
font-size: small;
|
261
|
+
font-family: monospace;
|
262
|
+
}
|
263
|
+
|
264
|
+
.figure .lineno {
|
265
|
+
text-align: right;
|
266
|
+
color: #B00;
|
267
|
+
font-family: monospace;
|
268
|
+
font-size: small;
|
269
|
+
padding-right: 1em;
|
270
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.ruby .normal {}
|
2
|
+
.ruby .comment { color: #005; font-style: italic; }
|
3
|
+
.ruby .keyword { color: #A00; font-weight: bold; }
|
4
|
+
.ruby .method { color: #077; }
|
5
|
+
.ruby .class { color: #074; }
|
6
|
+
.ruby .module { color: #050; }
|
7
|
+
.ruby .punct { color: #447; font-weight: bold; }
|
8
|
+
.ruby .symbol { color: #099; }
|
9
|
+
.ruby .string { color: #944; }
|
10
|
+
.ruby .char { color: #F07; }
|
11
|
+
.ruby .ident { color: #004; }
|
12
|
+
.ruby .constant { color: #07F; }
|
13
|
+
.ruby .regex { color: #B66; }
|
14
|
+
.ruby .number { color: #D55; }
|
15
|
+
.ruby .attribute { color: #377; }
|
16
|
+
.ruby .global { color: #3B7; }
|
17
|
+
.ruby .expr { color: #227; }
|
@@ -201,6 +201,20 @@ module Net
|
|
201
201
|
# ====================================================================
|
202
202
|
#++
|
203
203
|
|
204
|
+
def do_global_request( response )
|
205
|
+
name = response.read_string
|
206
|
+
want_reply = response.read_bool
|
207
|
+
request_data = response.remainder_as_buffer
|
208
|
+
|
209
|
+
@log.debug "GLOBAL_REQUEST received (#{name})" if @log.debug?
|
210
|
+
|
211
|
+
if want_reply
|
212
|
+
writer = @buffers.writer
|
213
|
+
writer.write_byte REQUEST_SUCCESS
|
214
|
+
@session.send_message writer
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
204
218
|
def do_request_success( response )
|
205
219
|
@log.debug "REQUEST_SUCCESS received" if @log.debug?
|
206
220
|
process_request response, true
|
@@ -396,18 +410,19 @@ module Net
|
|
396
410
|
# ====================================================================
|
397
411
|
#++
|
398
412
|
|
399
|
-
MESSAGES =
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
constant = Constants.const_get event.
|
407
|
-
|
408
|
-
:name => event,
|
413
|
+
MESSAGES = %w(
|
414
|
+
global_request
|
415
|
+
request_success request_failure channel_open channel_open_failure
|
416
|
+
channel_open_confirmation channel_window_adjust channel_data
|
417
|
+
channel_extended_data channel_eof channel_close channel_request
|
418
|
+
channel_success channel_failure
|
419
|
+
).inject({}) do |map, event|
|
420
|
+
constant = Constants.const_get event.upcase.to_sym
|
421
|
+
map[constant] = {
|
422
|
+
:name => event.to_sym,
|
409
423
|
:method => instance_method( "do_#{event}".to_sym )
|
410
424
|
}
|
425
|
+
map
|
411
426
|
end
|
412
427
|
|
413
428
|
end
|
@@ -53,7 +53,7 @@ module Net
|
|
53
53
|
# was just executed somehow, but this is not (cannot) be enforced.
|
54
54
|
def send_command( cmd, stdin=nil )
|
55
55
|
@log.debug "executing #{cmd.inspect}" if @log.debug?
|
56
|
-
send_data "#{cmd};
|
56
|
+
send_data "#{cmd}; printf '%s %d' #{CONFIRMATION} $?\n"
|
57
57
|
send_data stdin if stdin
|
58
58
|
|
59
59
|
out = ""
|
data/lib/net/ssh/session.rb
CHANGED
@@ -32,6 +32,9 @@ module Net
|
|
32
32
|
# The hash of options that were used to establish this session.
|
33
33
|
attr_reader :options
|
34
34
|
|
35
|
+
# The underlying connection
|
36
|
+
attr_reader :connection
|
37
|
+
|
35
38
|
# Create a new SSH session. This method polymorphically accepts a
|
36
39
|
# variable number of parameters, as follows:
|
37
40
|
#
|
@@ -206,8 +209,10 @@ module Net
|
|
206
209
|
@options.update args.shift if args.first.is_a?( Hash )
|
207
210
|
end
|
208
211
|
|
209
|
-
|
212
|
+
if !args.empty?
|
210
213
|
raise ArgumentError, "extra parameters detected: #{args.inspect}"
|
214
|
+
elsif @username.nil?
|
215
|
+
raise ArgumentError, "no username was given and none could be inferred from the environment"
|
211
216
|
end
|
212
217
|
|
213
218
|
@keys = @options[ :keys ]
|
@@ -81,6 +81,8 @@ module Net
|
|
81
81
|
"invalid option(s) to #{self.class}: #{invalid_options.inspect}"
|
82
82
|
end
|
83
83
|
|
84
|
+
@logger.debug "connecting" if @logger.debug?
|
85
|
+
|
84
86
|
@port = options[ :port ] || @default_port
|
85
87
|
@socket = timeout( options[:timeout] || 0 ) do
|
86
88
|
( options[:proxy] || @socket_factory ).open( host, @port )
|
data/lib/net/ssh/version.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.0
|
3
3
|
specification_version: 1
|
4
4
|
name: net-ssh
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2006-
|
6
|
+
version: 1.0.10
|
7
|
+
date: 2006-09-09 00:00:00 -06:00
|
8
8
|
summary: Net::SSH is a pure-Ruby implementation of the SSH2 client protocol.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
+
post_install_message:
|
28
29
|
authors:
|
29
30
|
- Jamis Buck
|
30
31
|
files:
|
@@ -32,6 +33,7 @@ files:
|
|
32
33
|
- doc/LICENSE-GPL
|
33
34
|
- doc/LICENSE-RUBY
|
34
35
|
- doc/manual
|
36
|
+
- doc/manual-html
|
35
37
|
- doc/manual/chapter.erb
|
36
38
|
- doc/manual/example.erb
|
37
39
|
- doc/manual/index.erb
|
@@ -75,6 +77,17 @@ files:
|
|
75
77
|
- doc/manual/parts/0031.txt
|
76
78
|
- doc/manual/stylesheets/manual.css
|
77
79
|
- doc/manual/stylesheets/ruby.css
|
80
|
+
- doc/manual-html/chapter-1.html
|
81
|
+
- doc/manual-html/chapter-2.html
|
82
|
+
- doc/manual-html/chapter-3.html
|
83
|
+
- doc/manual-html/chapter-4.html
|
84
|
+
- doc/manual-html/chapter-5.html
|
85
|
+
- doc/manual-html/chapter-6.html
|
86
|
+
- doc/manual-html/chapter-7.html
|
87
|
+
- doc/manual-html/index.html
|
88
|
+
- doc/manual-html/stylesheets
|
89
|
+
- doc/manual-html/stylesheets/manual.css
|
90
|
+
- doc/manual-html/stylesheets/ruby.css
|
78
91
|
- lib/net
|
79
92
|
- lib/net/ssh
|
80
93
|
- lib/net/ssh.rb
|