From: Randy Lawrence Date: 2004-07-12T05:03:46+09:00 Subject: Re: [ANN] Net::SSH 0.0.3 Jamis Buck wrote: > 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. > Wow, that was fast! We requested some of these features just days ago! Quick question: after we establish port forwarding, how difficult is it (or how easy) to terminate or re-establish it? For example, if we're port forwarding to a machine with dynamic IP and detect that its address changed after the initial port-forwarding was established. Thanks!!!