|
1 | 1 | ---
|
2 | 2 | meta:
|
3 | 3 | title: Troubleshooting remote desktop connections to Mac mini servers
|
4 |
| - description: This page suggests solutions for when you cannot establish a remote desktop connection to your Mac mini |
| 4 | + description: This page provides solutions for when you cannot establish a remote desktop connection to your Mac mini. |
5 | 5 | content:
|
6 | 6 | h1: Troubleshooting remote desktop connections to Mac mini servers
|
7 |
| - paragraph: This page suggests solutions for when you cannot establish a remote desktop connection to your Mac mini |
| 7 | + paragraph: This page provides solutions for when you cannot establish a remote desktop connection to your Mac mini. |
8 | 8 | tags: remote vnc connection apple-silicon error
|
9 | 9 | dates:
|
10 |
| - validation: 2024-12-19 |
| 10 | + validation: 2025-01-30 |
11 | 11 | posted: 2023-04-07
|
12 | 12 | categories:
|
13 | 13 | - bare-metal
|
14 | 14 | ---
|
15 | 15 |
|
16 |
| -This documentation provides a structured approach to diagnose and resolve issues when you cannot establish a remote desktop connection to your Mac mini. |
17 |
| - |
18 | 16 | <Macro id="requirements" />
|
19 |
| - |
20 | 17 | - A Scaleway account logged into the [console](https://console.scaleway.com)
|
21 | 18 | - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
|
| 19 | +- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/) |
22 | 20 | - A [Mac mini](/apple-silicon/how-to/create-mac-mini/)
|
23 | 21 |
|
24 |
| -## 1. Verify the server status |
| 22 | +## Problem |
| 23 | +You are unable to establish a remote desktop (VNC) connection to your Scaleway Mac mini. |
| 24 | + |
| 25 | +### Symptoms |
| 26 | +- VNC client fails to connect to the Mac mini. |
| 27 | +- Authentication errors occur during connection attempts. |
| 28 | +- Connection times out or is refused. |
| 29 | +- Mac mini appears unreachable. |
| 30 | + |
| 31 | +### Possible causes |
| 32 | +- The Mac mini is powered off or unresponsive. |
| 33 | +- The VNC port assigned during system setup is incorrect. |
| 34 | +- The SSH server is unresponsive. |
| 35 | +- Your connection is blacklisted due to failed attempts. |
| 36 | +- Incorrect credentials are being used. |
| 37 | +- Remote connection client compatibility issues. |
| 38 | + |
| 39 | +### Solution |
25 | 40 |
|
26 |
| -Execute the following `ping` command in a terminal on your local machine: |
| 41 | +#### Verify the server status |
| 42 | +Run the following command in a terminal: |
27 | 43 | ```sh
|
28 | 44 | ping -c 5 <server_ip>
|
29 | 45 | ```
|
30 |
| -Expected output: |
31 |
| -``` |
32 |
| -PING X.X.X.X (X.X.X.X): 56 data bytes |
33 |
| -64 bytes from X.X.X.X: icmp_seq=0 ttl=64 time=0.182 ms |
34 |
| -64 bytes from X.X.X.X: icmp_seq=1 ttl=64 time=0.261 ms |
35 |
| -64 bytes from X.X.X.X: icmp_seq=2 ttl=64 time=0.191 ms |
36 |
| -64 bytes from X.X.X.X: icmp_seq=3 ttl=64 time=0.200 ms |
37 |
| -64 bytes from X.X.X.X: icmp_seq=4 ttl=64 time=0.201 ms |
38 |
| -
|
39 |
| ---- X.X.X.X ping statistics --- |
40 |
| -5 packets transmitted, 5 packets received, 0.0% packet loss |
41 |
| -round-trip min/avg/max/stddev = 0.182/0.207/0.261/0.028 ms |
42 |
| -``` |
43 |
| -- If `ping` fails, try [rebooting the server](/apple-silicon/how-to/reboot-mac-mini/). |
44 |
| -- 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](/apple-silicon/how-to/shutdown-mac-mini/) for more information. |
45 |
| - |
46 |
| -## 2. Verify the VNC connection |
47 |
| - |
48 |
| -<Message type="important"> |
49 |
| - The VNC port on Mac mini systems is **randomly assigned** during system installation and may therefore be different from the default VNC port 5900. To connect successfully via VNC, use the specific port shown in the **Overview** section of your Mac mini’s configuration. |
50 |
| - For manual connections, ensure that the port from the **Overview** section is correctly entered in your VNC client settings, as this is necessary for a successful connection. |
51 |
| -</Message> |
| 46 | +If `ping` fails: |
| 47 | +- Try [rebooting the server](/apple-silicon/how-to/reboot-mac-mini/). |
| 48 | +- If the server was forced to shut down, wait 24 hours for automatic restart. |
52 | 49 |
|
53 |
| -Execute the following command in a terminal on your local machine: |
| 50 | +#### Verify the VNC connection |
| 51 | +Run the following command: |
54 | 52 | ```sh
|
55 | 53 | nc -zv <server_ip> <vnc_port>
|
56 | 54 | ```
|
57 |
| -Expected output: |
58 |
| -``` |
59 |
| -Connection to <server_ip> port <vnc_port> [tcp/rfb] succeeded! |
60 |
| -``` |
61 |
| -- If the connection fails, try [rebooting the server](/apple-silicon/how-to/reboot-mac-mini/). |
62 |
| -- If necessary, restart screen sharing via SSH. See [Restarting screen sharing via SSH](#restarting-screen-sharing-via-ssh). |
| 55 | +If the connection fails: |
| 56 | +- Verify the correct VNC port in the **Overview** section of your Scaleway console. |
| 57 | +- [Reboot the server](/apple-silicon/how-to/reboot-mac-mini/). |
| 58 | +- Restart screen sharing via SSH (see below). |
63 | 59 |
|
64 |
| -## 3. Verify the SSH server response |
65 |
| -Execute the following command: |
| 60 | +#### Verify the SSH server response |
| 61 | +Run the command: |
66 | 62 | ```sh
|
67 | 63 | nc -zv <server_ip> 22
|
68 | 64 | ```
|
69 |
| -Expected output: |
70 |
| -``` |
71 |
| -Connection to <server_ip> port 22 [tcp/ssh] succeeded! |
72 |
| -``` |
73 |
| -- If the connection fails, try [rebooting the server](/apple-silicon/how-to/reboot-mac-mini/). |
74 |
| - |
75 |
| -## 4. Check for connection blacklisting |
76 |
| -If VNC connection attempts repeatedly fail, the connection might be blacklisted, or the Apple screen sharing service might be unresponsive. |
77 |
| - |
78 |
| -- [Reboot the server](/apple-silicon/how-to/reboot-mac-mini/) to clear the `fail2ban` table. |
79 |
| - |
80 |
| -## 5. Verify your connection credentials |
| 65 | +If the connection fails, [reboot the server](/apple-silicon/how-to/reboot-mac-mini/). |
81 | 66 |
|
82 |
| -### Remote desktop (VNC) credentials |
83 |
| -- Ensure the correct username and password are used. These can be verified in the console. |
84 |
| -- For errors like "Authentication failed," verify credentials and retry. |
| 67 | +#### Check for connection blacklisting |
| 68 | +If VNC connection attempts fail repeatedly, your connection may be blacklisted. [Rebooting](/apple-silicon/how-to/reboot-mac-mini/) clears the `fail2ban` table. |
85 | 69 |
|
86 |
| -### SSH keys |
87 |
| -- Ensure the SSH key is correctly formatted and configured before installing the Mac. |
88 |
| -- SSH keys provided post-installation are not considered. |
| 70 | +#### Verify your connection credentials |
| 71 | +- VNC: Ensure correct username and password. |
| 72 | +- SSH: Ensure your SSH key was provided before installation. |
89 | 73 |
|
90 |
| -## 6. Verify remote connection client compatibility |
91 |
| -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](/apple-silicon/how-to/access-remote-desktop-mac-mini/#comparison-matrix-of-remote-desktop-clients). |
92 |
| - |
93 |
| -## 7. Reinstall the Mac mini |
94 |
| - |
95 |
| -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. |
96 |
| - |
97 |
| -Follow these steps to reinstall macOS on your Mac mini: |
98 |
| - |
99 |
| -1. Log in to your Scaleway console. |
100 |
| -2. Navigate to your Mac mini server. |
101 |
| -3. Select the option to reinstall a version of macOS. |
102 |
| - |
103 |
| -For detailed instructions, refer to [How to reinstall a Mac mini](/apple-silicon/how-to/reinstall-mac-mini/). |
| 74 | +#### Verify remote access client compatibility |
| 75 | +Use a compatible VNC client. See [this guide](/apple-silicon/how-to/access-remote-desktop-mac-mini/#comparison-matrix-of-remote-desktop-clients) for recommendations. |
104 | 76 |
|
| 77 | +#### Reinstall the Mac mini |
| 78 | +If all else fails, [reinstall macOS](/apple-silicon/how-to/reinstall-mac-mini/) via the Scaleway console. |
105 | 79 | <Message type="important">
|
106 |
| - 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. |
| 80 | + Reinstalling your Mac mini will delete all data on its disk. Ensure you have a backup of your data before launching any reinstallation. |
107 | 81 | </Message>
|
108 | 82 |
|
109 |
| -## Security and configuration |
110 |
| - |
111 |
| -### Enable and configure pf (Packet Filter) |
112 |
| -To restrict macOS Screen Sharing to specific IPs: |
113 |
| -1. Connect to your Mac mini via SSH: |
114 |
| - ```sh |
115 |
| - ssh@<your_mac_mini_ip> |
116 |
| - ``` |
117 |
| -2. Backup the `pf.conf` file: |
118 |
| - ```sh |
119 |
| - sudo cp /etc/pf.conf /etc/pf.conf.backup |
120 |
| - ``` |
121 |
| -3. Edit the `pf.conf` file: |
122 |
| - ```sh |
123 |
| - sudo nano /etc/pf.conf |
124 |
| - ``` |
125 |
| -4. Add rules to restrict access: |
126 |
| - ```sh |
127 |
| - ## Add these lines to block connections to port 5900 except from your static IP |
128 |
| - block in on en0 proto tcp from any to any port 5900 |
129 |
| - pass in on en0 proto tcp from <static IP> to any port 5900 |
130 |
| - ``` |
131 |
| - Replace `en0` with your network interface and `<static IP>` with the allowed IP address. |
132 |
| -5. Save and close the file. |
133 |
| -6. Apply the new configuration: |
134 |
| - ```sh |
135 |
| - sudo pfctl -f /etc/pf.conf |
136 |
| - ``` |
137 |
| -7. Test the screen sharing connection from the allowed IP and verify it is blocked from other IPs. |
138 |
| - |
139 |
| -<Message type="tip"> |
140 |
| - For advanced configuration and further information consult our [fail2ban tutorial](/tutorials/protect-server-fail2ban/). |
141 |
| -</Message> |
| 83 | +## Advanced configuration and security |
| 84 | + |
| 85 | +### Enabling and configuring Packet Filter (pf) |
| 86 | +To restrict access to screen sharing: |
| 87 | +```sh |
| 88 | +sudo nano /etc/pf.conf |
| 89 | +``` |
| 90 | +Add: |
| 91 | +```sh |
| 92 | +block in on en0 proto tcp from any to any port 5900 |
| 93 | +pass in on en0 proto tcp from <static IP> to any port 5900 |
| 94 | +``` |
| 95 | +Apply: |
| 96 | +```sh |
| 97 | +sudo pfctl -f /etc/pf.conf |
| 98 | +``` |
142 | 99 |
|
143 | 100 | ### Restarting screen sharing via SSH
|
144 |
| -If screen sharing is unresponsive, restart it via SSH: |
145 |
| -1. Connect to your Mac mini via SSH: |
146 |
| - ```sh |
147 |
| - ssh your_mac_mini_username@<your_mac_mini_ip> |
148 |
| - ``` |
149 |
| - - Replace `<your_mac_mini_username>` with your Mac mini username. |
150 |
| - - Replace `<your_mac_mini_ip>` with the actual IP address of your Mac mini. |
151 |
| -2. Restart the screen sharing daemon: |
152 |
| - ```sh |
153 |
| - sudo killall screensharingd |
154 |
| - ``` |
155 |
| - The service will restart automatically upon the next connection attempt. |
156 |
| - |
157 |
| -## Troubleshooting and support |
158 |
| -For further assistance, visit our #apple-silicon channel in the [Slack Community](https://slack.scaleway.com/). |
| 101 | +1. Connect via SSH: |
| 102 | +```sh |
| 103 | +ssh your_mac_mini_username@<your_mac_mini_ip> |
| 104 | +``` |
| 105 | +2. Restart screen sharing: |
| 106 | +```sh |
| 107 | +sudo killall screensharingd |
| 108 | +``` |
| 109 | + |
| 110 | +## Further troubleshooting |
| 111 | +If the issue persists, contact [Scaleway's support](https://console.scaleway.com/support) for assistance. |
0 commit comments