Apple - MacOS Mojave remote access login screen stuck on infinite loading spinner
Remote login should be allowed (System Preferences ->
Sharing ->
Remote login).
- Connect via ssh:
ssh user@host
- Run
sudo pkill loginwindow
- Connect using VNC as usual
This appears to be a bug in MacOS Mojave's VNC implementation. Thankfully, I have found a workaround.
In the settings app, select Sharing. Then select "Screen Sharing" on the left and click on the "Computer Settings..." button.
In the dialog that pops up, check "Anyone may request permission to control screen" and un-check "VNC viewers may control screen with password: _____".
It removes 1 layer of security, so I would not recommend this if your mac has any public ports configured. It still uses MacOS's authentication for accounts, so as long as you have good passwords on all your user accounts it still may be reasonably secure. Hope this helps anyone looking for a workaround for this.
My workaround was to run this command in order to completely prevent the login screen from appearing for VNC connections.
(Depending on your security needs, you may want to avoid this approach.)
sudo defaults write /Library/Preferences/com.apple.RemoteManagement VNCAlwaysStartOnConsole -bool true