You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How Do I Use Screen Sharing To Connect To Two Macs On The Same Network

I have an iMac at home, and, an iMac at my small business office. I use Screen Sharing on both iMacs, to access the other iMac, every day.


I just purchased a new iMac for home. I enabled Screen Sharing on this iMac.


I have assigned static IP addresses to all three iMacs, in the router. The home unit is an AirPort Extreme Base Station running v.7.6.4.

I forwarded AEBS Port 5900 to the new home iMac, and, AEBS Port 5901 to the old home iMac.

When I am at my office, I launch the Screen Sharing application, I type the AEBS IP address xxx.xxx.xxx.xxx for the newer home iMac. It connects instantly. If I open a second connection, what do I type for the older iMac that uses the same IP address, but, Port 5901. In my past VNC days, I would type xxx.xxx.xxx.xxx:5901, or, something similar, to access and connect to a second computer on this network, xxx.xxx.xxx.xxx:5902 for a third computer, and so on.


By the way, what is Enable IPv6 Connection Sharing?


Thank you.

iMac, OS X El Capitan (10.11.3)

Posted on Apr 18, 2016 7:06 PM

Reply
7 replies

Apr 18, 2016 8:19 PM in response to Vark Shark

Remember that :5901 is a "port number" not the IP address. You do port forwarding to connect from outside your local network, not within it. ie, the 5901, 5902, etc is for out of your local net, and is forwarded by router to a specific IP address within the local.


Within your local net, use Safari and type: VNC://192.168.1.4 (example IP address)

Apr 19, 2016 3:14 AM in response to Vark Shark

You appear to have set up everything correctly so first the first home Mac you would access it via


vnc://ip.address.of.your.home.router

or

vnc://ip.address.of.your.home.router:5900


for the second you would do


vnc://ip.address.of.your.home.router:5901


You might want to see if your home router supports a feature called Dynamic DNS, if so it could be used with a Dynamic DNS service like dydns.org to provide a host name you could use like this


vnc://myname.dydns.org


If your router does not support this feature you can still do this but instead by running a Dynamic DNS client program on one of the Macs.


See http://dyn.com/remote-access/

and http://dyn.com/apps/updater-mac/

Apr 19, 2016 5:48 AM in response to John Lockwood

Hello, John.


Thank you for your reply.


Previous to posting to this forum, I had tried your idea of typing xxx.xxx.xxx.xxx:5901 into the Screen Sharing IP address window field. Screen Sharing returned the following error message:


Connection failed to "xxx.xxx.xxx.xxx:5901".

Make sure Screen Sharing or Remote Management (in the Sharing section of System Preferences) is enabled on the remote computer.


I just tried this, again, a few moments ago. I obtained the same results. I have verified that the Screen Sharing settings on both home iMacs (old and new) are identical.


As I indicated, earlier, when I was using VNC servers and clients on my Macs and PCs, I could access four different computers (two Macs, two PCs) that resided on the same LAN, from one remote location. Having abandoned VNC servers and clients, a few years ago, and, using just OS X's built-in Screen Sharing, I can access only one home Mac remotely. (I don't use the PCs, anymore.)


I tried a few ideas, just now.

1: I typed yyy.yyy.yyy.yyy into the Screen Sharing IP address window field from my home new iMac. This is the IP address of the home old iMac. I had assigned this static IP address to this iMac, from within the AEBS, some time ago. Sure enough, I can access my home old iMac from my home new iMac.


2: I typed xxx.xxx.xxx.xxx:5901 into the Screen Sharing IP address window field from my home new iMac. This is the IP address of the home AEBS. This is the port number that I have assigned to the home old iMac, from within the AEBS. Screen Sharing returned the following error message:


Connection failed to "xxx.xxx.xxx.xxx:5901".

Make sure Screen Sharing or Remote Management (in the Sharing section of System Preferences) is enabled on the remote computer.


3: I typed xxx.xxx.xxx.xxx::5901 into the Screen Sharing IP address window field from my office iMac. Notice the double colon. This is the IP address of my home AEBS, and, the port number that I have assigned to the home old iMac, from within the AEBS. Screen Sharing presented the login window. I entered the login credentials. Screen Sharing opened a window for the home new iMac. I repeated this experiment by using ports 5902, 5903, 5904, 5905. I obtained the same results.


Seeing how the AEBS port forwarding assignments configuration setups for both the home old and new iMacs are identical (except for the port numbers), I'm wondering if this problem is just a syntax issue, when I enter the home AEBS router IP address and the home old iMac port number into the Screen Sharing IP address window field. Perhaps, a colon is not the correct separator for the IP address and the port number. It always was for most of the VNC servers/clients that I used, in the past. Although, I remember that one VNC application required double colons.


In summary, I can access my home old iMac from my home new iMac, by using the home old iMac LAN IP address, without a port number. However, I cannot access my home old iMac from my small business office iMac by using the home AEBs IP address and the home old iMac port number.


Your thoughts on all of this?


Thank you.

Apr 19, 2016 6:08 AM in response to Vark Shark

I had forgotten to check but it looks like the built-in Apple Screen Sharing does not let you change the port it listens to, so you have correctly setup port forwarding on your router (the AirPort Extreme) but both Macs are listening on the default port of 5900.


Probably the easiest solution is to install a third-party VNC server application on the second Mac such as Vine VNC https://sourceforge.net/projects/osxvnc/ and set it to listen for connections on 5901.


However you should be able to set the AirPort Extreme to map ports in a way to solve this.


For Mac A map external port 5900 to the Mac internal port 5900 using Mac A IP address

For Mac B map external port 5901 to the Mac internal port 5900 using Mac B IP address


See https://www.rainmachine.com/support/portforwarding/Port-Forwarding-Apple-AirPort Extreme-Router-for-HTTPS.pdf

How Do I Use Screen Sharing To Connect To Two Macs On The Same Network

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.