Alexander Klimov wrote:
> 
> 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
> 
> 




Thanks for the reply. Ill consider that.
Though for me since I'm using -g, Ill just grep using netstat, that will fix
the problem, but I was curious to see if this could be done.


-- 
View this message in context: 
http://www.nabble.com/Determine--forwarded-ports--tf3449873.html#a9703801
Sent from the SSH (Secure Shell) mailing list archive at Nabble.com.

Reply via email to