Skip to content

Connecting a Windows VM to Herdr as an SSH machine

Interactive Diagram

새 탭 ↗

Opening a separate SSH window for each coding agent on a Windows VM means switching between local and remote terminals. Herdr’s saved SSH machines put local and Windows workspaces in one sidebar. Agents and shells run on their own machines, while the local Herdr client displays the remote screen and status.

Start with a working SSH connection. If ssh windows-vm works, run herdr machine add windows-vm --label "Windows VM" locally to register it. Herdr supports a native Windows server, so this connection does not require WSL.

The examples use a Mac as the local client and a Windows x86_64 VM as the remote server. Commands and support details follow the official documentation as of 2026-11-09. The existing Herdr collaboration article covers splitting agent roles and repositories; this article focuses on connecting Windows.

Separate the local display from remote execution

Section titled “Separate the local display from remote execution”

The Herdr client displays your work, while the server keeps shells and agents running. Registering a machine saves a connection profile for a remote server; it does not move local programs onto the VM.

ComponentLocationRole
Herdr clientMacSelect local and remote workspaces and display their screens
OpenSSH ServerWindows VMHandle SSH connections and authentication
Herdr server and panesWindows VMRun remote shells and agents

The local Herdr client connects to a Windows VM over SSH and receives its remote session screen and status

Illustration: original PlantUML diagram based on the Herdr connection guide and Windows support documentation.

Meet these requirements first.

  • The Mac can run ssh and herdr.
  • OpenSSH Server is available on the Windows x86_64 VM.
  • The VM’s SSH port is reachable, and you can authenticate with the intended Windows account.

If OpenSSH Server is missing, follow Microsoft’s installation guide. If it is already installed, check its service in Windows PowerShell.

Terminal window
Get-Service sshd

If the service is installed but stopped, start it and configure automatic startup in an administrator PowerShell window.

Terminal window
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic

Windows Firewall and any network rules outside the VM must allow the SSH port you use. Limit access to the client addresses that need it. Changing Herdr settings before ordinary SSH works makes the cause harder to isolate.

Put the VM’s connection details in ~/.ssh/config on the Mac. If you already have an SSH alias, use that name.

~/.ssh/config
Host windows-vm
HostName windows-vm.example.com
User vmuser
Port 22
IdentityFile ~/.ssh/id_ed25519

Replace HostName and User with your actual destination and Windows account. For public-key authentication, set IdentityFile to the corresponding private key. This configuration alone does not install its public key on the VM.

Test the connection from a Mac terminal.

Terminal window
ssh windows-vm

Verify the host key on the first connection. Check that the Windows shell opens, then run exit to return to the Mac. Run the following machine registration commands on the Mac, not inside the VM.

The SSH alias keeps the host address, port, and account in one place. Herdr uses this OpenSSH configuration and does not store passwords or private keys in the saved machine profile.

Use an interactive Mac terminal so you can answer installation or server replacement prompts.

Terminal window
herdr machine add windows-vm --label "Windows VM"

Herdr checks the compatibility of the remote executable and running server. When necessary, it asks for approval to install or update the Windows package. It starts the selected session’s background server before saving the connection profile.

If a running server must be replaced, setup asks whether it may stop that server and its pane processes. The default answer is No. Finish any work in progress before replacing it. Different local and remote version numbers alone are not a reason to stop the server.

Installing Herdr remotely in advance is not always necessary. Registration can guide you through setup. Background reconnects cannot ask for installation or update approval, so finish the initial setup in a terminal.

You can specify a destination without an SSH alias. This is an alternative to registering the alias.

Terminal window
herdr machine add vmuser@windows-vm.example.com --label "Windows VM"

Use an SSH URI to include a port.

Terminal window
herdr machine add "ssh://vmuser@windows-vm.example.com:2222" --label "Windows VM"

Choose the command that matches your connection method rather than running all three.

One machine profile points to one remote session. It does not combine every Herdr session on the Windows VM.

Interactive setup discovers running sessions. It selects the only session or shows a picker when several are running. If none are running, it uses default.

Add --remote-session to select a specific session. This example registers the same VM’s agents session under a separate label.

Terminal window
herdr machine add windows-vm \
--label "Windows agents" \
--remote-session agents

If an existing workspace is missing, check whether you connected to another session or Windows account. Changing only the display name with --label does not select a different session.

Check saved profiles and current reachability from the Mac.

Terminal window
herdr machine list
herdr machine status "Windows VM"

Reachable means the remote Herdr server is available now. It does not mean every open client has already connected.

If local Herdr is open, the added machine appears in its sidebar. Select Windows VM or one of its workspaces to switch to the remote screen. If Herdr is not open yet, launch it from a Mac terminal.

Terminal window
herdr

Commands entered in a Windows pane execute on Windows. Local coding agents, executables, configuration, and secrets are not automatically copied to the VM. Prepare the required tools and authentication remotely as well.

The remote Herdr server and panes keep running when the client closes or the SSH connection drops. This is different from shutting down the VM or stopping the remote server.

SymptomCheck first
Ordinary ssh windows-vm failsAddress, port, sshd, firewall, account, and authentication
! auth in the sidebarSSH authentication errors and whether host-key confirmation is needed
! error or Attention in the sidebarThe displayed error, remote installation, and server compatibility
Connected, but the expected workspace is missingSSH account and --remote-session
A command is missing in a Windows paneRemote tool installation and the new SSH session’s PATH

If you need to authenticate again, run this in an interactive Mac terminal.

Terminal window
herdr machine reconnect "Windows VM"

machine reconnect performs SSH authentication and checks the saved connection. It does not install or update Herdr. For package or server compatibility problems, follow the interactive setup instructions in the official connection troubleshooting guide.

After installing or updating Herdr on Windows, use a new terminal or reconnect SSH to pick up the updated path. A server started with administrator privileges requires an administrator client by default, so check for different privilege levels even when using the same account.

  • This procedure targets a native Windows x86_64 server. Windows ARM and a Linux server inside WSL are not the same target.
  • SSH provides access to the VM. Machine registration does not create the VM, open network access, or create accounts.
  • Remote UI access and remote CLI automation can have different support requirements. Selecting a machine in the sidebar does not retarget CLI commands in a local pane. Follow the official --machine guidance for automation.
  • Windows does not support live server handoff. Plan for interrupted work when replacing a server.

Use a saved machine to switch between local and Windows work in one window. For a one-off attachment to a remote session, the herdr --remote approach in the official remote access guide is another option.