This work is in the public domain in the United States because it was published in the United States between 1930 and 1977, inclusive, without a copyright notice.
To share your macOS screen using VNC, enable Screen Sharing in System Settings, then use a VNC viewer on another device to connect to your Mac's IP address or hostname, using the password you set.
I clicked on the apple | System Setting | General | Sharing menu item on the machine I wanted remote access to.
I enabled Screen Sharing and Remote Login
I entered the url vnc://192.168.20.42 into a copy of safari I wanted to access the remote desktop from
Safari started Screen Sharing
I entered my login details
I selected Standard
I was able to access the desktop remotely
To connect to a remote Mac using the command-line terminal, the primary method involves using Secure Shell (SSH). This allows you to execute commands on the remote machine as if you were directly interacting with its local terminal.
I connected to my mac mini using ssh