I'm working from a network that blocks some high ports which prevents me from SSH'ing into my Windows machine on my home network from my Mac. I normally use the following command to establish a tunnel that I connect over with the Remote Desktop client on OS X.
ssh -p 22601 -L3389:Windows:3389 user@Ubuntu1 -N
In this case I have 2 machines:
- Server A: Ubuntu1 (port 22601)
- Server B: Windows (port 3389)
In order to work around port 22601 being blocked on my current network I could tunnel through another machine. Let's call it Ubuntu2 and it has an SSH server running on port 22. I've tried a couple of combinations, but I can't seem to make this connection work. I've got the same SSH public key access for Ubuntu 1 and 2. In all cases I'm using the same username.
What command line should I be executing to do this, and do I have to do anything else in the SSHd configuration on Ubuntu2?