Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

SSH Without using primary account

Hey!


Does anyone know if it is possible to receive SSH commands to a secondary account on a mac?


I only have one user on my Mac (which of course is an admin), but I want to create a second account (as a standard user with SSH privileges) to receive commands. Will it work for this secondary account to receive and run commands while my main account is still signed-in? Also, does that secondary account need to be logged in to receive commands, or does it just need to exist but not be signed in.


Thanks!

MacBook Pro 13″, macOS 13.1

Posted on Jan 29, 2023 4:37 PM

Reply
Question marked as Best reply

Posted on Jan 30, 2023 4:35 AM

Yes.


At is core, macOS is a Unix based system. And ssh can login to any account you create which has logins enabled (accounts you create will have logins enabled by default, unless you prohibit logins in Settings-> Sharing-> Remote Login)


The other account does not need to be already logged in, assuming you are not trying to interact with the GUI.


You are also able to use Screen Sharing with the other account(s) while your admin account is using the display. The remote system sees a virtual display and can run any GUI app independent of the admin user using the physical display.


I am assuming the ssh or Screen Sharing sessions are happening locally, in the same home or office, and are not being performed across the internet.


Accessing the Mac across the internet has its on secondary access and security issues.

2 replies
Question marked as Best reply

Jan 30, 2023 4:35 AM in response to Alex_Oreo

Yes.


At is core, macOS is a Unix based system. And ssh can login to any account you create which has logins enabled (accounts you create will have logins enabled by default, unless you prohibit logins in Settings-> Sharing-> Remote Login)


The other account does not need to be already logged in, assuming you are not trying to interact with the GUI.


You are also able to use Screen Sharing with the other account(s) while your admin account is using the display. The remote system sees a virtual display and can run any GUI app independent of the admin user using the physical display.


I am assuming the ssh or Screen Sharing sessions are happening locally, in the same home or office, and are not being performed across the internet.


Accessing the Mac across the internet has its on secondary access and security issues.

Jan 29, 2023 5:45 PM in response to Alex_Oreo

Alex_Oreo wrote:

Does anyone know if it is possible to receive SSH commands to a secondary account on a mac?

Yes. I'm not sure what you mean by "secondary" account. There is no such thing.

I only have one user on my Mac (which of course is an admin), but I want to create a second account (as a standard user with SSH privileges) to receive commands. Will it work for this secondary account to receive and run commands while my main account is still signed-in?

Maybe. Depends on the command.

Also, does that secondary account need to be logged in to receive commands, or does it just need to exist but not be signed in.

Again, maybe.


Most commands will work fine. But sometimes you may trip some privacy projection layer that requires a pop-up to confirm. And some commands will only work in a logged-in session.


The Mac really isn't a server.

SSH Without using primary account

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.