Reinstalling your Mac mini will erase all data on the disk and reset all configurations to default settings. Ensure you have a backup of your data before proceeding.
Troubleshooting remote desktop connections to Mac mini servers
This documentation provides a structured approach to diagnose and resolve issues when you cannot establish a remote desktop connection to your Mac mini.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A Mac mini
1. Verify the server status
Execute the following ping
command in a terminal on your local machine:
ping -c 5 <server_ip>
Expected output:
PING X.X.X.X (X.X.X.X): 56 data bytes64 bytes from X.X.X.X: icmp_seq=0 ttl=64 time=0.182 ms64 bytes from X.X.X.X: icmp_seq=1 ttl=64 time=0.261 ms64 bytes from X.X.X.X: icmp_seq=2 ttl=64 time=0.191 ms64 bytes from X.X.X.X: icmp_seq=3 ttl=64 time=0.200 ms64 bytes from X.X.X.X: icmp_seq=4 ttl=64 time=0.201 ms--- X.X.X.X ping statistics ---5 packets transmitted, 5 packets received, 0.0% packet lossround-trip min/avg/max/stddev = 0.182/0.207/0.261/0.028 ms
- If
ping
fails, try rebooting the server. - If rebooting fails or if the server was forced to shut down, wait 24 hours for automatic restart. See How to shutdown a Mac mini for more information.
2. Verify the VNC connection
Execute the following command in a terminal on your local machine:
nc -zv <server_ip> 5900
Expected output:
Connection to <server_ip> port 5900 [tcp/rfb] succeeded!
- If the connection fails, try rebooting the server.
- If necessary, restart screen sharing via SSH. See Restarting screen sharing via SSH.
3. Verify the SSH server response
Execute the following command:
nc -zv <server_ip> 22
Expected output:
Connection to <server_ip> port 22 [tcp/ssh] succeeded!
- If the connection fails, try rebooting the server.
4. Check for connection blacklisting
If VNC connection attempts repeatedly fail, the connection might be blacklisted, or the Apple screen sharing service might be unresponsive.
- Reboot the server to clear the
fail2ban
table.
5. Verify your connection credentials
Remote desktop (VNC) credentials
- Ensure the correct username and password are used. These can be verified in the console.
- For errors like “Authentication failed,” verify credentials and retry.
SSH keys
- Ensure the SSH key is correctly formatted and configured before installing the Mac.
- SSH keys provided post-installation are not considered.
6. Verify remote connection client compatibility
Ensure your remote connection client is compatible with macOS. Incompatible remote desktop (VNC) clients can cause failed connection attempts. For recommended VNC clients, see How to access to the remote desktop of a Mac mini.
7. Reinstall the Mac mini
If the previous attempts to resolve connection issues to your Mac mini have been unsuccessful, you may need to reinstall your server from the Scaleway console.
Follow these steps to reinstall macOS on your Mac mini:
- Log in to your Scaleway console.
- Navigate to your Mac mini server.
- Select the option to reinstall a version of macOS.
For detailed instructions, refer to How to reinstall a Mac mini.
Security and configuration
Enable and configure pf (Packet Filter)
To restrict macOS Screen Sharing to specific IPs:
- Connect to your Mac mini via SSH:
ssh@<your_mac_mini_ip>
- Backup the
pf.conf
file:sudo cp /etc/pf.conf /etc/pf.conf.backup - Edit the
pf.conf
file:sudo nano /etc/pf.conf - Add rules to restrict access:
Replace## Add these lines to block connections to port 5900 except from your static IPblock in on en0 proto tcp from any to any port 5900pass in on en0 proto tcp from <static IP> to any port 5900
en0
with your network interface and<static IP>
with the allowed IP address. - Save and close the file.
- Apply the new configuration:
sudo pfctl -f /etc/pf.conf
- Test the screen sharing connection from the allowed IP and verify it is blocked from other IPs.
For advanced configuration and further information consult our fail2ban tutorial.
Restarting screen sharing via SSH
If screen sharing is unresponsive, restart it via SSH:
- Connect to your Mac mini via SSH:
ssh your_mac_mini_username@<your_mac_mini_ip>
- Replace
<your_mac_mini_username>
with your Mac mini username. - Replace
<your_mac_mini_ip>
with the actual IP address of your Mac mini.
- Replace
- Restart the screen sharing daemon:
The service will restart automatically upon the next connection attempt.sudo killall screensharingd
Troubleshooting and support
For further assistance, visit our #apple-silicon channel in the Slack Community.