1

When I run:

ssh -i mycert -R 0:localhost:80 user@myserver.com

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 user@myserver.com

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

3

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

  • That's what I thought. Thanks for the sanity check. – Nimjox Sep 16 '15 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.