From: Jamis Buck Date: 2004-07-06T22:30:37+09:00 Subject: Re: [ANN] Net::SSH 0.0.2 Patrick May wrote: > Hello, > > On Monday, July 5, 2004, at 09:32 PM, Jamis Buck wrote: > >> So, if I understand it correctly, what you (all) would expect to be >> able to do is something like the following: >> >> Thread.new do >> Net::SSH.forward_local( proxy_host, >> local_port, >> remote_host, >> remote_port ) >> end >> >> do_something_on( 'localhost', local_port ) >> >> Is that correct? > > > Why not just call the method #tunnel? > > Of course, whatever looks right from your house is fine by me. Thanks > for Net::SSH! > > Cheers, > > Patrick > Well, the term the SSH docs use is "port forwarding", so if you're familiar with SSH but not Net::SSH, it might be easier to find the functionality if it is called "forward". Secondly, SSH supports two types of port forwarding: forwarding a local connection to a remote machine, and vice versa (remote connection to local machine). Thus, I see having a "forward_local" method, and a "forward_remote" method. These would correspond (respectively) to the -L and -R options of the OpenSSH "ssh" executable. However, if anyone has a compelling reason why the naming should be otherwise, please let me know. I'm definately not religious about this. -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis ruby -ropenssl -e'k="01234567";p((c,c.padding,c.iv,c.key=OpenSSL::Cipher::BF.new,false,k,k*2)[0].decrypt.update("1A81803C452C324619D319F980D5B84DBB45FC0FE2BAA045".scan(/../).map{|n|n.to_i(16).chr}.join))'