public
Description: Pure Ruby implementation of an SSH (protocol 2) client
Homepage: http://rubyforge.org/projects/net-ssh
Clone URL: git://github.com/jamis/net-ssh.git
Search Repo:
various documentation tweaks
jamis (author)
Sat Mar 22 19:42:49 -0700 2008
commit  b15c34734df0d35d9dc82434c965d4e831120265
tree    be7b0b2d3b3222c51cd38118b964a3d700845b16
parent  83eb567b8568bb81f16b24e0136b36e909994817
...
 
 
...
1
2
0
@@ -1 +1,3 @@
0
+doc
0
+ri
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@
0
 
0
 Net::SSH is 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.
0
 
0
-== FEATURES/PROBLEMS:
0
+== FEATURESS:
0
 
0
 * Execute processes on remote servers and capture their output
0
 * Run multiple processes in parallel over a single SSH connection
...
30
31
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
34
35
...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
0
@@ -30,6 +30,29 @@
0
   #
0
   # Net::SSH::Connection::Session and Net::SSH::Connection::Channel have more
0
   # information about this technique.
0
+ #
0
+ # = "Um, all I want to do is X, just show me how!"
0
+ #
0
+ # == X == "execute a command and capture the output"
0
+ #
0
+ # Net::SSH.start("host", "user", :password => "password") do |ssh|
0
+ # result = ssh.exec!("ls -l")
0
+ # puts result
0
+ # end
0
+ #
0
+ # == X == "forward connections on a local port to a remote host"
0
+ #
0
+ # Net::SSH.start("host", "user", :password => "password") do |ssh|
0
+ # ssh.forward.local(1234, "www.google.com", 80)
0
+ # ssh.loop { true }
0
+ # end
0
+ #
0
+ # == X == "forward connections on a remote port to the local host"
0
+ #
0
+ # Net::SSH.start("host", "user", :password => "password") do |ssh|
0
+ # ssh.forward.remote(80, "www.google.com", 1234)
0
+ # ssh.loop { true }
0
+ # end
0
   module SSH
0
     # This is the set of options that Net::SSH.start recognizes. See
0
     # Net::SSH.start for a description of each option.
...
38
39
40
41
42
43
 
44
45
46
47
 
48
49
50
...
38
39
40
 
41
 
42
43
 
44
 
45
46
47
48
0
@@ -38,13 +38,11 @@
0
   # and, if you want to proceed anyway, simply call the remember_host!
0
   # method on the exception, and then retry.
0
   class HostKeyMismatch < Exception
0
- # :nodoc:
0
     # the callback to use when #remember_host! is called
0
- attr_writer :callback
0
+ attr_writer :callback #:nodoc:
0
 
0
- # :nodoc:
0
     # situation-specific data describing the host (see #host, #port, etc.)
0
- attr_writer :data
0
+ attr_writer :data #:nodoc:
0
 
0
     # An accessor for getting at the data that was used to look up the host
0
     # (see also #fingerprint, #host, #port, #ip, and #key).
...
41
42
43
44
 
45
46
47
...
41
42
43
 
44
45
46
47
0
@@ -41,7 +41,7 @@
0
           when TrueClass, FalseClass then :bool
0
           end
0
 
0
- actual = packet.send(:"read_#{type}")
0
+ actual = packet.send("read_#{type}")
0
         next if expected.nil?
0
         raise "expected #{type} #{expected.inspect} but got #{actual.inspect}" unless expected == actual
0
       end

Comments

    No one has commented yet.