I spent some time figuring out something that puzzled me, so I thought I'd document it here.
The active sessions depended on the WiFi connection on macOS (Catalina // 10.15.7).
WiFi off:
abduco
# Active sessions (on host riccardos-MacBook-Pro.local)
# Sat 2021-07-10 22:55:29 bb
# Fri 2021-07-09 15:50:09 gif
# Wed 2021-07-07 11:40:27 ac
# Wed 2021-07-07 10:37:06 pz
# Thu 2021-06-17 14:37:40 on
WiFi connected to some network:
abduco
# Active sessions (on host riccardos-MBP.lan)
WiFi connected to some other network:
abduco
# Active sessions (on host Justynas-Air.localdomain)
I noticed that abduco uses gethostname
and landed on an apple.stackexchange.com answer that explains what's going on:
If there's no HostName available, what you see is probably coming from the DNS or DHCP server.
You can check the current HostName with scutil --get HostName
. Mine was HostName: not set
.
After setting it with sudo scutil --set HostName 'yourHostName'
I can see my sessions regardless of the network connection.
Happy to open a PR and document this somewhere if you find it useful. Otherwise, please feel free to close this 🙏