(no title)
grvbck | 1 month ago
Yeah, the official Apple support forums are and have always been embarrassingly bad.
I don't use the CLI on my Macs all that often, so there might be a better way to do it, but this works on Tahoe:
networksetup -listpreferredwirelessnetworks en0 | grep -v '^Preferred networks on' | head -1 | xargs
There's also get-ssid:
https://github.com/fjh658/get-ssid
godelski|1 month ago
Is Tahoe doing something different? If so, honestly that only exemplifies my point of how Apple is creating a difficult ecosystem to navigate through, where the correct incantations change, even through minor versions.
*IT IS MADDENING*
I think the README is quite illustrative of the problem here. Seems like John ran into the same issue I was! He even mentions the issue with the `-getairportnetwork` flag for `networksetup`.But get-ssid still has a problem... it requires root. For my original use case I was wanting to run ssh proxy jumps and rsyncs based on the SSID I'm connected to. This doesn't really work for those cases. Escalating to root just creates a major security concern and I definitely don't want automated processes doing escalating unless absolutely necessary.