When I type "who" in Terminal on my Mac, it shows two connections. Is someone remotely logged in, and how do I block them?
I can’t tell you for sure, since I can’t see exactly what you see after you type “who” in Terminal, but when you do that you should see two users. In fact, if you didn’t, that would indicate something is wrong.
The first should say “console.” That’s what logs in when you start your Mac and (presumably) type in the password for your user account on your Mac.
The second will start with “tty” and most likely be “tty000.” That’s still you, but it is the session you opened when you started Terminal. Try opening a new Terminal window and then type “who” again. You should see something like this:
[username] console [date & time]
[username] tty000 [date & time]
[username] tty001 [date & time]…where [username] is the same (and is the username for your local account on your Mac), and [date & time] will be whatever times those session were opened. The first will be the last time you restarted your Mac, the second will be the time you opened the first Terminal window, and the third will be the time you opened the second Terminal window.
If you need more proof, open another Terminal window and type “who” again. Now it should look like this:
[username] console [date & time]
[username] tty000 [date & time]
[username] tty001 [date & time]
[username] tty002 [date & time]The last like will still have your username and the date and time will be the time you opened that window.
If any of those usernames are different, make sure you don’t have another user account on your Mac that is active. This is uncommon for most people. You can test this by restarting your Mac. When you log in there should be only one active user. Regardless of how many “tty” entries you see, if the username is yours, then that’s all you.
If, after restarting, you see different usernames when you type “who” in Terminal, there is most likely a user who automatically gets logged in at startup that is not you. If you have admin privileges on that computer, you can see all users and adjust this behavior in System Preferences (pre-macOS Ventura) or by selecting Settings (macOS Ventura and later) from the Apple () menu and then clicking Users & Groups.
If you are still convinced someone is remotely logged in, take your Mac to an Apple Store or Authorized Apple Service Center. They can verify it for you, or maybe better explain why there is not (and if there actually is, they can help you take care of it).
Mac help Security and privacyIf this helped you, consider buying me a slice of pizza to help keep the site running. If this solved a big problem for you, consider buying me the whole pie!
Need help with this?
I help people in New Orleans and online with Apple gear, websites and more. Contact me or see more answers in the Knowledgebase.