Since the Screen Sharing feature seems to be the only one unable to connect, the best way to diagnose its behavior is by using the application directly.
Please, launch screen sharing located in:
/System/Library/CoreServices/ScreenSharing.app
The application has no visible "UI" so don't expect a fancy Cocoa interface. Instead, once you have loaded it, all you'll see is this "poor" icon in the Dock:
Click on it and then go to Preferences in the Mac menu bar. You should be presented with:
Notice the second option to only encrypt passwords and keystrokes. That's fine, but as you can see, there's no option to skip encryption altogether. Some VNC versions have incompatibilities with encryption, but this would be rather shocking since you're talking about OS X vs OS X.
In any case, once you have the settings like that, try connecting, again, in the menu bar: Connection -> New (or ⌘cmd + N).
A simple dialog appears asking you to enter the Host's name. Following your screenshots, try: 192.168.1.99 and hit enter.
We'll see what happens from here. Also, have the Console.app open on both computers, to see if there are any System messages going on (or anything related).
To enable remote management (including screensharing), issue the following command over ssh
:
Note: This command sets your vnc password to 'mypasswd' as set by the -vncpw
flag in the command, you should change this.
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all
To disable the remote management, issue the following command over ssh
:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
Best Answer
So apparently you can use the Back To My Mac infrastructure to get to SSH even if there's no port open on the router in front of the relevant Mac:
Find your iCloud account number by executing this command in terminal:
Example output
(Make a note of the number on the last line, in this case 123456789 (this is just an example).
The hostname you need to use for ssh is <computer's local hostname>.<number above>.members.btmm.icloud.com. Replace spaces with hyphens, and omit apostrophes (the default name is "Name's <type of Mac>")
The command I used therefore was:
To complete the solution to my problem (rebooting), once logged in via SSH, I used the following command to restart:
(Sourced from here)