On Thu, 22 Mar 2007, joeull wrote: > Can you determine the ports that are forwarded during an SSH > connection? I'd like to create a script using the randomly forwarded > ports in our application, but don't know how to determine that. I > can grep and diff nestat -lant | grep -i list, but I'd like just get > a clean list of the currently forwarded ports. I'm using > OpenSSH_4.3p2.
It is not clear what you mean: AFAIK, there is no way to instruct [Open]SSH to forward random ports. That is you always says what ports you want to forward. If you have a script that generates that random numbers you should extend the script to store the numbers somewhere (maybe environment variables) and read the stored list once you need it. -- Regards, ASK
