Secure Shell
Dynamically allocated port on reverse forward Aug 16 2010 10:19PM
Joke de Buhr (joke seiken de) (1 replies)
hi,

I discovered ssh option of dynamically allocating a port on reverse forwarded
connections (option: -R)

If I invoke ssh this way:
ssh -R 0:localhost:22 remote_ssh_server
ssh prints a debug message like:
Allocated port 40454 for remote forward ....
before it drops to the shell.

Is there a way of querying the allocated port on the remote site to make it
usable within scripts? For example to execute a command via ssh on the origin
site in this case.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQG7BAABAwAlBQJMabl4Hhhoa3A6Ly9wb29sLnNrcy1rZXlzZXJ2ZXJzLm5ldAAK
CRCWUloJhwFWxghxC/9VeNOpv9Wz21LLH5a/AA0O6UbwPR0vVsAsKE5SitXL117Y
YrKA9HWqw2B6zjrbgZcXyeKSxCqimvlppMbCgOuXbsDllOPmRCcQazXsS3ZgCji/
uFmzJbS/vXrYiUOoPX8uP+OoAI9hHLK0/XMcrfZq+YgnI55baMfA1KUPrOLFyBNO
ScIqI4qEFqzzyVMlfaiaKWGOa5gt24j9ASVAUBfwseFHZmcUji1iYrJcBv8MPr1y
qAdiyVplqZCwHB1kHga371Jvz9q3WE2bq+mqrLuaGbgzF/c1DI5RCchSYDPVSmdJ
hiISDU59ul8w6YjIESJUSLRy6GtW2f3CbYxYs7SfyJ07h0/optYj+7jnH6aV+Dku
p6LPCTuJ7q07jg+ticmDJQWy7SEHQKdewsX+UHa9wHf3S3DmNEWTlLQKitdBCrkX
gkZbksYZXR/nP4opbPK8JRp82tdu2VqZUUY6OPxji/GSzXFyul/Z0we8pKPNwgiF
PuJeBLZ4O+ROGWu2Qqs=
=AWkc
-----END PGP SIGNATURE-----

[ reply ]
Re: Dynamically allocated port on reverse forward Aug 17 2010 04:59AM
ADFHAU (openssh bachelorguy com) (1 replies)
Re: Dynamically allocated port on reverse forward Aug 17 2010 06:02PM
Joke de Buhr (joke seiken de) (1 replies)
RE: Dynamically allocated port on reverse forward Aug 17 2010 07:49PM
Males, Jess (jmales cio sc gov) (1 replies)
Re: Dynamically allocated port on reverse forward Aug 17 2010 08:57PM
Joke de Buhr (joke seiken de)


 

Privacy Statement
Copyright 2010, SecurityFocus