Enabling SSH in macOS through Terminal

Tags mac


This article will explain how to turn on remote login (SSH) on macOS computers from Terminal and add a user to the remote login group.

This also works remotely using Apple Remote Desktop, as long as Remote Management is enabled on the remote computer.


  • macOS
  • SSH


Modify SSH Service

  • Enable the service: sudo systemsetup -setremotelogin on
  • See the current remote login status: sudo systemsetup -getremotelogin
  • Disable remote login: sudo systemsetup -setremotelogin off

Add User to Remote Login Group

  • sudo dseditgroup -o edit -a USERENAME -t user com.apple.access_ssh
  • You can also add the user via System Settings > General > Sharing > Remote Login
Print Article


Article ID: 1970
Fri 5/29/20 1:52 PM
Thu 1/25/24 4:51 PM