Skip to content

Instantly share code, notes, and snippets.

@smaddock
Created August 9, 2018 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smaddock/b972d49b33d4aeb666096f1ae06da7ef to your computer and use it in GitHub Desktop.
Save smaddock/b972d49b33d4aeb666096f1ae06da7ef to your computer and use it in GitHub Desktop.
Enable Remote Login for Administrators group - macOS
#!/bin/bash
if sudo systemsetup -getremotelogin | grep -q Off; then
sudo systemsetup -setremotelogin on;
fi
if ! dseditgroup com.apple.access_ssh &> /dev/null ; then
dseditgroup -o create -q com.apple.access_ssh;
fi
sudo dseditgroup -o edit -a admin -t group com.apple.access_ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment