Port 0 forwarding

Lucio Crusca lucio at sulweb.org
Wed Mar 16 03:10:02 EST 2005


Hello all.

I posted here a few days ago about the support of dynamic selection of the 
port to forward (ssh -R 0:host:port), which refers to section 7.1 of 
http://www.ietf.org/internet-drafts/draft-ietf-secsh-connect-24.txt .
My posts were from lcml at pixel.it, while this is from lucio at sulweb.org. 
Nevermind, It's always me.

Here is the patch that adds support for that thing. It's in unified diff I 
believe, but I don't know if I generated the right way. It's based on the 
latest stable sources (openssh-4.0p1).

The patch is tested and seems to work on my system (Debian GNU/Linux Sarge 
i386), but I have no other resources to do other tests.

There is a problem: while the relevant part of the protocol is now 
implemented, both on the client and the server side, it lacks the user 
interface, so the only way for the user to realize what port the server has 
choosen is to nmap the server and guess from the output. The fact is that I 
really don't know how to provide a useful interface for that, because the 
information it's of some interest for the server, but not for the client I 
believe. So, how do we make sshd tell someone what port it has choosen? 
Setting an env variable is not possible AFAIK, because the forwarding may be 
established after the interactive session has been started. Executing a 
configurable script? Maybe, but I'm not sure it's the best solution. Any 
suggestion is appreciated.

Lucio Crusca.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt.gz
Type: application/x-gzip
Size: 1999 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20050315/47372d05/attachment.bin 


More information about the openssh-unix-dev mailing list