How to Remotely Restart or Shut Down Your Mac

Don't power off a sleeping Mac; use a remote restart instead

What to Know

  • On remote Mac: Open System Preferences > Sharing. Check the box next to Screen Sharing. Copy the address of the remote Mac.
  • On local Mac: Open Finder or click the desktop. Select Go in the menu bar and choose Connect to Server.
  • Enter the remote Mac address in format vnc://123.456.7.89. Select Connect. In the remote window, select Apple > Shut Down or Restart.

This article explains how to remotely restart or shut down a Mac using Screen Sharing. It also contains information on using the Remote Login function. This information applies to Macs with macOS Big Sur (11), macOS Catalina (10.15), or macOS Mojave (10.14).

Remotely Restart or Shut Down a Mac With Screen Sharing

There are two ways to remotely access a Mac on your local network. The first is through the Screen Sharing function, which is disabled by default.

On the Remote Mac Computer

To enable Screen Sharing on the remote Mac computer:

  1. Open System Preferences. Either go to the Dock and click the System Preferences icon or go to the Apple menu and select System Preferences.

  2. Select Sharing in the System Preferences pane.

    Mac System Preferences with Sharing highlighted
  3. Select the Screen Sharing check box.

    Screen Sharing selected in the Sharing preferences
  4. Save or write down the network name of the remote Mac.

    Sharing network name in Mac Sharing preferences

On a Local Mac Computer

On a local Mac computer, follow these instructions to shut down or restart the remote computer:

  1. Open Finder or click anywhere on the desktop.

  2. From the menu bar, select Go and then choose Connect to Server.

    The Mac Go menu with Connect to Server highlighted
  3. In the Connect to Server window, enter either the address or the network name of the remote Mac in the format vnc://numeric.address.ofthe.mac. For example, vnc://

    Alternatively, enter the network name of the remote Mac after the dashes, for example, vnc://MyMacsName.

  4. Select Connect.

    Server address entered into Connect to Server preference screen
  5. Depending on how you set up Screen Sharing, you may be asked for a name and password. Enter the appropriate information and then select Connect.

  6. A new window opens that displays the remote Mac's desktop.

  7. Move the mouse cursor into the remote desktop window, go to the menu bar and select the Apple icon.

  8. Select Shut Down to shut down the target Mac computer or select Restart to restart it.

    Shut Down chosen in the Apple menu

Use Remote Login to Shut Down or Restart a Mac

The second way is through the Remote Login function, which requires the use of Terminal, the Mac command-line interface.

This feature is disabled by default and must be enabled on the remote Mac before you can control it from another computer.

On the Remote Mac

  1. Launch System Preferences. Either go to the Dock and click System Preferences or go to the Apple menu and select System Preferences.

  2. Select Sharing in the System Preferences pane.

    System Preferences selected and Sharing icon highlighted
  3. Select the Remote Login check box to enable remote login.

  4. Next to Allow access for, select Only these users.

    Remote Login selected in the Mac Sharing preferences

    To add more users and groups, select the + icon and choose from the list that appears.

  5. Save or write down the command to access the remote Mac. It is listed above the Users panel and will look like ssh user@IPaddress. For example, ssh george@

    The command to access the Mac remotely

On the Local Mac

Now access the remote Mac from a Mac on the same network.

  1. Open Terminal. Select Applications > Utilities > Terminal.

    The Applications > Utilities > Terminal path on a Mac
  2. In Terminal, type the remote login command. This is the command you saved from the Sharing preferences pane on the remote Mac. It should look like ssh user@IPaddress. This gives you login access to the remote Mac.

    A terminal window on a Mac

    You may need to input your administrator-level password.

  3. To shut down the remote Mac, type sudo shutdown -h now. To restart the remote Mac, type sudo shutdown -r now.

    Instead of now, type +n, with n representing a number in minutes that will elapse before the command is executed. For example, sudo shutdown -r +5 will reboot the remote Mac in five minutes.

  4. If you shut down or reboot the Mac from the SSH command line, you may immediately lose your SSH connection. This behavior is expected. You can re-authenticate as soon as the remote machine has rebooted.

Was this page helpful?