When I run:
ssh -i mycert -R 0:localhost:80 [email protected]
and run the following on 'myserver.com':
curl localhost:dynamicly_assigned_port
I get 'ssh:Server send unrequested port, from port XXXX'. However running:
ssh -i mycert -R 20000:localhost:80 [email protected]
curl localhost:20000
Works fine. Any idea's why I get this error when using the dynamically allocated port but not when using a static port. My guess is its due to the old ssh version used in dropbear v0.52 but looking for any other ideas. Thanks
This error means that the server sent an unrequested forwarded port that the client didn't expect. In short, the dropbear SSH client doesn't know how to handle the dynamically allocated port forward which the remote server has allocated for it. It is unsupported by dropbear.
The relevant code:
Where the dropbear client parses the remote forward request and adds it to its tracked forward list: https://github.com/schemacs/dropbear/blob/3c4d57db86668f3cecd91566f971371fbea8684b/cli-runopts.c#L569
Where the dropbear client iterates through the remotefwds
it requested and tries to find a match for the port forward which the server has setup: https://github.com/schemacs/dropbear/blob/3c4d57db86668f3cecd91566f971371fbea8684b/cli-tcpfwd.c#L214
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments