Anyone successfully VNC Mac from Windows remotely?

nasa

Well-Known Member
Joined
Apr 30, 2009
Messages
266
Reaction score
1
Location
Cape Town
Hi, I have a mac at home, and i've read that one can enable Apples built-in VNC server (simply called "Remote Desktop" in true Apple style), then port forward the VNC default port through the router.

I've got WinVNC Viewer at work, and planning to use external IP of home connection. Have not tried this yet, anyone with any experience in this field? Any known issues that may arise? Is WinVNC Viewer only designed to handle Windows remote screens?

Tnx

EDIT: Have discovered that VNC is OS-independant, so WinVNC should be fine even when logging into Mac.
 
Last edited:
VNC is an "open" standard.. so yo can VNC from/to any VNC client/server irrespective of OS. Get a dyndns.org (or similar) account (free) - some routers you can tell to update your IP every time it changes - then you can always "see" your router with a domain name e.g. myname.dyndns.org will point to your routers current public IP.

You may need to forward one or two more ports (im not sure if MAC uses added authentication)... but all in all you should be fine.
 
WRT OS independence, I've got a VNC server running on a Windows XP machine on this network, and I can access it flawlessly using Ubuntu's built-in/bundled Remote Desktop Viewer... so you should have any issues assuming the port forwarding is set up correctly for access over the Net.
 
Apple's built in VNC offering is called Screen Sharing (not Remote Desktop) however when connecting from a windows machine running Vine VNC server on my mini was much easier . . . I can't recall why though. :o
 
VNC is an "open" standard.. so yo can VNC from/to any VNC client/server irrespective of OS. Get a dyndns.org (or similar) account (free) - some routers you can tell to update your IP every time it changes - then you can always "see" your router with a domain name e.g. myname.dyndns.org will point to your routers current public IP.

You may need to forward one or two more ports (im not sure if MAC uses added authentication)... but all in all you should be fine.

Cool thanks.. So I just need to check if my router can automatically update the IP address...
 
i've heard the default VNC port is 5900... on dyndns they talk about 3389/TCP... should I be forwarding both?

EDIT: Got it to work... super slow though! Any way to speed it up?
 
Last edited:
Apple's built in VNC offering is called Screen Sharing (not Remote Desktop) however when connecting from a windows machine running Vine VNC server on my mini was much easier . . . I can't recall why though. :o

Yes sorry, Screen Sharing controlled by Remote Management...
 
When I try to use 8-bit colour to speed it up, the screen doesnt load, it just flashes and closes/crashes... any ideas?
 
Yes sorry, Screen Sharing controlled by Remote Management...
There are two distinct products. There is Apple's free Screen Sharing app which, as it is based on VNC, is windows compatible. Then there is Apple's (rather expensive imo) Remote Desktop (http://www.apple.com/remotedesktop/) which afaik isnt windows compatible.

Then to muddle the waters Microsoft offers a Remote Desktop client for the Mac to control computers running their software . . . :D
When I try to use 8-bit colour to speed it up, the screen doesnt load, it just flashes and closes/crashes... any ideas?
That may have been why I went the Vine route.
 
Here is what I do to connect to my Mac at home from Windows at work :

1. Use dyndns.org to manage dynamic IP on ADSL router at home.
2. Forward port 22 on my ADSL router to my MAC.
3. On my Mac, under sharing preferences I have "screen sharing" and "remote login" enabled.
4. On the screen sharing setup tab, go to computer setting and tick "VNC Viewers may control screen with password"
5. On your windows machine, install a free SSH Client and VNC Client.
6. Use the following SSH command to get back to your mac : ssh -N usernameofmac@yourdyndnsaddress -L 6900:localhost:5900
7. Open VNC on your windows machine and connect to VNC://localhost:6900

This is the most secure way of doing this. I would STRONGLY advise AGAINST forwarding port 5900 directly on your router. Use SSH wherever possible.
 
I haven't specifically gone Mac -> Windows with it, but TeamViewer works a treat on iPad/Mac/iPhone into Windows boxes. And it's free, as long as you are not using it commercially.

There is a Mac client available so maybe give that a try if VNC doesn't do the job.

http://www.teamviewer.com/download/index.aspx?os=mac

+1

I use Teamviewer between my Mac and PC all the time. Best remote desktop app I've seen :) And no config required :)
 
That may have been why I went the Vine route.

True story. I disabled "Remote Management" and installed Vine Server instead. Turns out Apples built-in VNC server doesnt support 8-bit colour depth, or one has to sudo to get it to work. Vine Server works perfectly.
 
True story. I disabled "Remote Management" and installed Vine Server instead. Turns out Apples built-in VNC server doesnt support 8-bit colour depth, or one has to sudo to get it to work. Vine Server works perfectly.
I knew I had a reason! :)
 
Here is what I do to connect to my Mac at home from Windows at work :

1. Use dyndns.org to manage dynamic IP on ADSL router at home.
2. Forward port 22 on my ADSL router to my MAC.
3. On my Mac, under sharing preferences I have "screen sharing" and "remote login" enabled.
4. On the screen sharing setup tab, go to computer setting and tick "VNC Viewers may control screen with password"
5. On your windows machine, install a free SSH Client and VNC Client.
6. Use the following SSH command to get back to your mac : ssh -N usernameofmac@yourdyndnsaddress -L 6900:localhost:5900
7. Open VNC on your windows machine and connect to VNC://localhost:6900

This is the most secure way of doing this. I would STRONGLY advise AGAINST forwarding port 5900 directly on your router. Use SSH wherever possible.

Cool, so I could use PuTTY and Vine Server as well? How would one go about doing this using PuTTY? Any easier SSH Clients?
 
Cool, so I could use PuTTY and Vine Server as well? How would one go about doing this using PuTTY? Any easier SSH Clients?

In Putty, go to Connection -> SSH -> Tunnels and configure your tunnel there! Chose a local port (6900 works well), destination will be localhost:5900
Under session at the top, enter usernameofmac@yourdyndnsaddress and click open.
In your VNC Viewer, connect to localhost:6900

Let me know if it doesnt work for you!
 
In Putty, go to Connection -> SSH -> Tunnels and configure your tunnel there! Chose a local port (6900 works well), destination will be localhost:5900
Under session at the top, enter usernameofmac@yourdyndnsaddress and click open.
In your VNC Viewer, connect to localhost:6900

Let me know if it doesnt work for you!

Ok, so say my macs network name is 'mymac', then:

When defining tunnel -
Source port: 6900
Destination: localhost:5900 ('localhost' or 'xxxx.dyndns.org')?

When defining session -
Host name: [email protected]

Also, how is port 6900 significant if its accessing the mac using port 22? (Excuse my ignorance, not 100% clued up on ports etc.)
 
Ok, so say my macs network name is 'mymac', then:

When defining tunnel -
Source port: 6900
Destination: localhost:5900 ('localhost' or 'xxxx.dyndns.org')?

When defining session -
Host name: [email protected]

Also, how is port 6900 significant if its accessing the mac using port 22? (Excuse my ignorance, not 100% clued up on ports etc.)

OK, if your mac's network name is mymac, you will have a dyndns entry pointing back to it. Something like mymac.dyndns.org that resolves to the IP that mymac lives on.

So to SSH onto it, you would go -> SSH [email protected]

That establishes the connection tunnel to the remote machine.

The -L command does the port redirection. So you need to tell ssh what port you want on the machine you are ssh'ing from to tunnel to.

So, say on the machine you are ssh'ing to, you want to connect to port 5900. the end of the tunnel on the remote side is ITS localhost. so you use localhost:5900. For arguments sake, if you wanted to use your mac on the remote end to route to your adsl router on 192.168.1.1 on port 80 for web access, you would use 192.168.1.1:80.

Because ports 80 and 5900 are most probably in use already on the machine that you are ssh'ing FROM, you have to use another port. I use 6900 or 6901 because they are normally free. so the SSH -L 6900:localhost:5900 command does this - it tunnels traffic on port 6900 from the machine your are ssh'ing from to port 5900 on the machine your are ssh'ing TO.
The username@domain establishes the connection to the remote machine, thats it.

So if you wanted to connect to your adsl router at home, this is what you would do. SSH onto your mac at home, and tell it to route the traffic on port 6900 on your client machine to port 80 on your router. you would then open your browser and go to http://themachineyouaresshingFROM:6900 and your adsl router's webadmin page would load. Normally the machine your are sshing from is 127.0.0.1 or localhost.

The commands would thus be for you, assuming on your home network the router is on 192.168.1.1 :

SSH [email protected] -L 6900:192.168.1.1:80
Open your browser and go to http://localhost:6900

If you wanted to view the webserver on the mac you are sshing to at home :

SSH [email protected] -L 6900:localhost:80
Open your browser and go to http://localhost:6900

I think you will get the drift, hope this helps!
In summary, the process is establish the tunnel, direct the ports.

SSH "CREDENTIALS OF REMOTE MACHINE" -L "LOCALPORT ON CLIENT MACHINE":"DESTINATION IP YOU WANT REMOTE MACHINE TO ROUTE TO (USE LOCAL IF ITS THE SAME MACHINE)":"DESTINATION PORT"

Let me know if you still dont come right.
P
 
Thanks for this. Makes a bit more sense. I will try it out and play around a bit to get it to work.

The only thing im a bit confused about is the "[email protected]" part... because the username on my Mac is a full name, for example "John Smith"... I don't imagine i would write it as "John [email protected]"...? Which username should I be using?
 
Which username should I be using?

Go to System Preferences>Accounts
Make sure that the padlock on the bottom left of the screen is unlocked so you can make changes.
Under "My Accounts" right click your account, and select "Advanced Options" (if you dont unlock the padlock, this option will not be available to you)
You will then be able to see the advanced details of your account, including what your account name is. If you used John Smith, it should have shortened it to johnsmith. But best bet is to go and check!
 
Top
Sign up to the MyBroadband newsletter
X