Skip to content
Servey logoServey

How to check whether someone has connected to your Mac remotely

By Janesh Kapoor · · 5 min read

If you have ever wondered whether someone else has been on your Mac, the honest answer is that macOS makes it harder to check than it should be. The records exist, but they are spread across three different systems, two of them expire quickly, and none of them cover the remote access app you probably installed. Here is what you can actually find out, in the order worth trying - and why Servey keeps its own log instead.

Frequently asked questions

How do I check if someone has connected to my Mac remotely?
Start with the last command in Terminal, which lists login sessions newest first and shows the source address for a remote SSH login. Then check screen sharing separately with log show --predicate 'process == "screensharingd"' --last 24h, because macOS records the two in different places. Finally open System Settings, General, Sharing and see which services are actually switched on. An address you do not recognise in last is a genuine finding worth acting on.
Does macOS keep a history of screen sharing sessions?
Only briefly. Screen sharing activity goes to the unified log, which is a rolling buffer sized for debugging rather than auditing, and on a busy Mac it can roll over within hours. If something happened last month the record is gone. Login sessions recorded by last last considerably longer, which is why that is the better place to start, and it is also why a tool that keeps its own durable log is more useful than it sounds.
Will these commands show sessions from TeamViewer or AnyDesk?
No. A third-party remote tool runs its own agent and its own connection rather than going through Remote Login or Screen Sharing, so it appears in none of the built-in logs. Whether any record exists depends on the vendor, and consumer tiers often keep none that you can read. This is why the standard advice for a remote access tool you no longer use is to uninstall it rather than leave it installed and switched off.
Does Servey keep a record of who connected?
Yes, and it stays on your Mac. Servey writes a plain-language activity log covering the Mac coming online, which device connected and over which path, every incorrect master password attempt and any lockout, every device approval and removal, and every session opened, resumed, ended or timed out. It is never uploaded to us, so it is a record you hold rather than one you ask a vendor for. It covers Servey only, so the built-in commands are still the right tools for SSH and Screen Sharing.
What should I do if I find a remote login I did not make?
Disconnect the Mac from the network first, so nothing can change while you look. Then switch off Screen Sharing, Remote Login and Remote Management in System Settings under Sharing, and change your Apple Account password and your Mac login password from a different device you trust. Check Users and Groups for an account you did not create, and Login Items for anything set to start on its own. The whole sequence takes about an hour and closes every door regardless of what was really happening.

Servey puts your Mac in your pocket. Launching soon.