Enable SSH for only one user via command line

If you want to enable SSH for only one user using the command line on a Mac, run these three commands:

Make sure the group exists

sudo /usr/sbin/dseditgroup -o create -q com.apple.access_ssh

Add user username to the group

sudo /usr/sbin/dseditgroup -o edit -a username -t user com.apple.access_ssh

Turn remote login on

sudo /usr/sbin/systemsetup -setremotelogin on


Greg Neagle’s tip on the MacEnterprise Mailing List
Script to allow Administrators sec group to Remote Login

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.