I have setup a build server using a Mac Mini with M1 CPU, running OS X 13. Almost all went fine, but I wasn't able to login via SSH, even though everything was configured correctly. Ping worked, but no SSH and bo VNC.
I was pulling a few hairs. Eventually, I drove to the office where the Mac is in the server room, logged in via GUI... And was able to login via SSH even.
As it turned out, I really need to login via GUI at least once in order to enable SSH and VNC after each reboot.
This is no solution for a server hidden in a server room.
Can this be changed via some hidden config files in OS X? Or is that because I have FileVault enabled?