Dynamically allocated -R port

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,

When I use -R0:host:port, the remote port is allocated dynamically by
ssh and the following message is written to stdout:

Allocated port 43623 for remote forward to host:port

My problem is that I would like the remotely executed command to have
knowledge of this port number. Is there any way to have it exposed as
an environment variable on the remote side?



Site Timeline