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.
sudo systemsetup -setremotelogin on
sudo systemsetup -getremotelogin
sudo systemsetup -setremotelogin off
sudo dseditgroup -o edit -a USERENAME -t user com.apple.access_ssh