Latest "Networking" files
Workshop » Reference Section » Grimoires » IT » Platforms » MacOS » Networking

SSH into local mac, error “WARNING- REMOTE HOST IDENTIFICATION HAS CHANGED!”

SSHing into a local MacOS machine at address "macbook.local", I suddenly got this:

[code]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:oKCEu3pDdq7xBhSPZwOzR2q0eWTvfphtvn3D4Bjz8v4. Please contact your system administrator. Add correct host key in /Users/username/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /Users/username/.ssh/known_hosts:147 Host key for macbook.local has changed and you have requested strict checking. Host key verification failed.[/code]

The solution was to run ssh-keygen -R macbook.local then try the ssh again. Then it asked me whether or not to accept the key, instead of rejecting it:

[code]$ ssh username@macbook.local The authenticity of host 'macbook.local (fe80::1890:fd32:c304:69cd%en0)' can't be established. ED25519 key fingerprint is SHA256:oKCEu3pDdq7xBhSPZwOzR2q0eWTvfphtvn3D4Bjz8v4.…
Workshop » Reference Section » Grimoires » IT » Platforms » MacOS » Networking

Prevent MacOS from locking screen when you disconnect screen sharing

I screenshare into a Mac for playing video on my TV, and had an intermittent problem where Firefox would not play video while screen sharing was connected, but then locked the screen as soon as I disconnected.

It turns out that if the screen is locked when you log in via screensharing, MacOS defaults to locking it again when you disconnected, and, being MacOS, the ability to turn this off has been removed from the UI.

Enter this in terminal to turn it off: sudo defaults write /Library/Preferences/com.apple.RemoteManagement RestoreMachineState -bool NO