Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a MacBook and i want to connect to a remote Windows machine, which is connected to a Linux Server. When i'm at my locally there in the network, i use the to connect to the windows machine.

Now i want to do the same from home. The Windows machine is not connected to the internet.

The magic word is ssh Tunnel. So far so good. But i'm not quite able to manage it. I think the problem is with the port on the linux machine. How do i open the RDP port on the Server ? ( given the permissions )

share|improve this question
up vote 2 down vote accepted

From your Mac, you will need to open an SSH tunnel. This assumes that you have SSH access to the Linux server at work and a valid user account on that Linux server.

In a window on your Mac, something like:

sudo ssh -L 3389:windows_internal_IP:3389 username@linux_external_IP

Where windows_internal_IP is the internal IP that you use to access the Windows system at work and linux_external_IP is the internet-facing IP address of the Linux server. username is your user name on the Linux system.

If that connection is successful, you'll be able open your Mac's Remote Desktop client and connect to

share|improve this answer
this worked great !! THANKS !!! – fragant1996 May 12 '12 at 21:41
Good. The sudo is specifically needed on the Mac. Please mark the answer here as well. – ewwhite May 12 '12 at 21:45
ssh -L 3389:YourWinPCIPaddr:3389

This will forward WinPCs RDP (port 3389 i think) to your local pc's port 3389.

Then just use the RDP client to connect to 'localhost'

ps, if you're running RDP on your local machine too, it will not let you bind to 3389. Then you have to choose another port:

ssh -L 12345:YourWinPCIPaddr:3389

And then connect to localhost:12345

share|improve this answer
Thanks. I would also vote you up. But i need 15 Reputation :( – fragant1996 May 12 '12 at 21:59
@fragant1996 Now that you've got a few upvotes on your question, you now have enough rep. – Ward May 13 '12 at 2:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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