Re: Random local port - WeOnlyDo Discussion board

Re: Random local port (General questions)

by Chad Amberg, Saturday, August 26, 2006, 15:57 (6463 days ago) @ woddrazen

Hi Chad,


Here is example which will show you what channel is started after you make RemoteListen Connection:

-------------------------
Dim i As Integer

For i = 0 To SSH_1.Channels.Count - 1
Debug.Print SSH_1.Channels(i).RemotePort & = & SSH_1.Channels(i).Activated
Next i
-------------------------

Hope I helped.


Regards,
Drazen

Hi Drazen-
If I open up a connection saying that the remote port is 0, because we can't know what port is available ahead of time, your debug output above always shows port 0.

However, the server does open up a random port correctly.

Looking at http://www.ietf.org/rfc/rfc4254.txt for the SSH_MSG_CHANNEL_OPEN_CONFIRMATION message, it does seem that when the server replies, that it includes both sides of the channel information. Of course, I've never debugged what the actual SSH conversation looks like, but I'm hoping that you can tell me that after a tunnel is opened, that the server does respond with the port information, and that this can be added to wodtunnel hopefully?

Thanks,
Chad



Complete thread: