I would like to have a user account in my MacOS X El Capitan system which is limited to login through SSH. I do not want that user to be able to use the system through any other means, especially not on the local desktop. I would like that user not to be listed as possible options when logging into the desktop.
Obviously the user needs to be allowed to access via SSH on the Sharing preferences menu. Setting the user's shell to /usr/bin/false
, a usual way to disable login for users on MacOS X without deleting them, seems to disable SSH access as well as desktop access. Currently the only way I could come up with is setting a password for the user that the user doesn't know, but I suppose users could then change the password by themselves.
On Debian GNU/Linux for example I would be able to disable the password and/or login altogether. Is there something similar on MacOS?