Install x11vnc
You can only use x11vnc with X11. Disable Wayland gdm login screen by uncommenting
WaylandEnable=false
setting in
/etc/gdm/custom.conf
After powering on the machine, ssh and run the following command:
sudo -u gdm x11vnc -display :0 -auth /run/user/120/gdm/Xauthority
You can now use your VNC client to login. The session will be terminated immediately after gdm login.