Turn on Remote Login and Screen Sharing
This guide shows you how to check, turn on, and turn off Remote Login (SSH) and Screen Sharing in a Pomme VM. Pomme makes these changes through the authenticated guest agent, so the VM must be running normal macOS.
Before you begin
Section titled “Before you begin”- Start the VM in normal macOS. For details, see Manage the VM lifecycle.
- Make sure that the guest agent is connected. To check, run
pomme agent status VM_NAME. For details, see Check, update, and repair the guest agent.
Check Remote Login status
Section titled “Check Remote Login status”To see whether Remote Login is on, run the following command:
pomme remote-login status VM_NAMEReplace VM_NAME with the name of your VM.
The command runs /usr/sbin/systemsetup -getremotelogin in the guest and
prints its output.
Turn Remote Login on or off
Section titled “Turn Remote Login on or off”To turn on Remote Login, run the following command:
pomme remote-login enable VM_NAMETo turn it off, run the following command:
pomme remote-login disable VM_NAMEReplace VM_NAME with the name of your VM.
The guest agent changes the setting and then reads it back. If the observed setting doesn’t match the request, the command fails.
Connect to the guest over SSH
Section titled “Connect to the guest over SSH”Pomme doesn’t report the guest’s IP address. To find it, ask the guest:
pomme exec VM_NAME -- /usr/sbin/ipconfig getifaddr en0Replace VM_NAME with the name of your VM. If the command prints nothing, the
guest’s primary network interface might have a different name. To list all
interfaces, run pomme exec VM_NAME -- /sbin/ifconfig.
Then connect from the host with an account that exists in the guest:
ssh USER_NAME@GUEST_ADDRESSReplace the following:
USER_NAME: the short name of a guest account that has a password.GUEST_ADDRESS: the address that the previous command printed.
For most tasks, you don’t need SSH. To run commands and copy files through the authenticated guest agent instead, see Run commands in a VM and Transfer files.
Manage Screen Sharing
Section titled “Manage Screen Sharing”Pomme exposes the following Screen Sharing commands:
pomme screen-sharing status VM_NAMEpomme screen-sharing enable VM_NAMEpomme screen-sharing disable VM_NAMEReplace VM_NAME with the name of your VM.
Before it sends the request, Pomme authenticates the persistent guest agent
and checks that it advertises the ui.screenSharing capability. If the agent
doesn’t, the command fails with the following error:
Screen Sharing is unavailable through Pomme because this guest agent does not support it. Configure it in the guest’s Sharing settings instead.To see the capabilities that a VM’s agent advertises, run
pomme agent status VM_NAME --format json and read the
guestAgent.capabilities array.