Hi,

I installed net-ssh right now and wanted to try the example you
provided in your  mail. I got the following error:

sshtest.rb:6: uninitialized constant
Net::SSH::Service::PortForwardManager (NameError)
        from sshtest.rb:4:in `start'
        from sshtest.rb:4

I'd be glad if you could help me get this to work.

regards,
jochen

Jamis Buck <jgb3 / email.byu.edu> wrote in message news:<40F197E2.7030409 / email.byu.edu>...
> Net::SSH is a Ruby implementation of the SSH2 client protocol.
> 
>    http://rubyforge.org/projects/net-ssh
> 
> You asked for it, and you got it! Version 0.0.3 now supports port 
> forwarding. You can enable forwarding both from local to remote ports, 
> and vice versa (corresponding to the -L and -R options of ssh). Also, 
> you can programmatically mimic connection to/from ports, using handler 
> objects.
> 
> Here's a quick demo of port forwarding:
> 
>    Net::SSH.start( 'localhost' ) do |session|
>      manager = Net::SSH::Service::PortForwardManager.new( session )
> 
>      manager.forward_local( 12345, 'www.yahoo.com', 80 )
>      manager.forward_local( 12346, 'www.google.com', 80 )
> 
>      session.main_loop { true }
>    end
> 
> See the "examples" subdirectory for more examples.
> 
> This release also allows clients to specify their preferred SSH 
> algorithms. This means you can (for example) enable zlib compression of 
> the data stream. See the examples subdirectory for an example of how to 
> do this.
> 
> A few other fixes have been made, though the code is still far from 
> perfect, or complete. More work needs to be done on:
> 
>    - increasing the coverage of the SFTP protocol
>    - supporting ssh-agent if one is running
>    - supporting private keys with key/value pairs in their headers
>    - implementing a synchronous version of Net::SSH::Session
> 
> Try it out and let me know what you like/don't like. Wishlists are 
> accepted, as well. :) As usual, any version of Ruby < 1.8.2 will need to 
> have the patched version of OpenSSL, also available from the Net::SSH 
> downloads page.