docs: document the Windows host SSH toolchain - #5341
Conversation
8b32f74 to
2c07ada
Compare
f452a60 to
df1997c
Compare
|
AI review: https://jandubois.github.io/lima/20260727-195856-pr-5341.html It claims it still has important issues, but they are kind of silly now; I think it is ready to merge. |
| - v6.2.0 or later (Linux) | ||
|
|
||
| On a Windows host, "qemu" needs an OpenSSH installation for its own `ssh`, | ||
| `scp`, and `ssh-keygen`. Mounts there must be reverse-sshfs, because QEMU |
There was a problem hiding this comment.
Do we have a functional support for reverse-sshfs?
Needs some Dokan (FUSE) to be manually set up?
There was a problem hiding this comment.
It works, but for Ubuntu we need to add the AppArmor rule for the home directory format. I noticed reverse-sshfs doesn't even work on macOS anymore with Ubuntu because /Users/jan does not match any rule.
I'll create a PR for this tomorrow.
There was a problem hiding this comment.
I've created #5375 to fix the AppArmor rules to allow access to all mounted directories. I have tested it locally on macOS, but am waiting for the QEMU on Windows integration test to see if it works on Windows too.
Note that we don't have any integration test to make sure reverse-sshfs keeps working on macOS with Ubuntu. It was broken for a long time, and nobody noticed, so maybe nobody cares.
There was a problem hiding this comment.
waiting for the QEMU on Windows integration test to see if it works on Windows too
The AppAmor change does work, but now reverse-sshfs on Windows is still broken for yet another reason. Will try to figure it out.
| docker build -o type=tar,dest=custom-rootfs.tar . | ||
| ``` | ||
|
|
||
| ### Windows toolchain |
There was a problem hiding this comment.
I've shorted the doc; let me know if you think it is still too long.
There was a problem hiding this comment.
Still "TLDR".
What are the required steps, for typical users?
df1997c to
b1245ee
Compare
Lima now supports native Windows OpenSSH alongside the Cygwin-based toolchains, and the two differ in which binaries they ship, which path form they produce, and where their sftp-server lives. Document what to install, how Lima picks between them, and what changes for reverse-sshfs mounts. Also replace the Known Issues bullet that claimed Windows ships no ssh.exe. Lima unpacks a .tar.gz rootfs itself, so only xz, bzip2, and zstd archives still need an external binary. These pages describe the state after the copytool and reverse-sshfs support lands, so this should merge after those. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
b1245ee to
19dc338
Compare
| Windows 10 and 11 ship an OpenSSH client in `C:\Windows\System32\OpenSSH\`, and | ||
| that's all the WSL2 driver needs. | ||
|
|
||
| The QEMU driver's reverse-sshfs mounts also want `sftp-server.exe`, which |
There was a problem hiding this comment.
QEMU seems off-topic in wsl2.md
| - v8.2.1 or later (macOS) | ||
| - v6.2.0 or later (Linux) | ||
|
|
||
| On a Windows host, "qemu" needs an OpenSSH installation for its own `ssh`, |
There was a problem hiding this comment.
| On a Windows host, "qemu" needs an OpenSSH installation for its own `ssh`, | |
| On a Windows host, "qemu" needs an [OpenSSH installation](URL GOES HERE) for its own `ssh`, |
|
|
||
| ### Windows toolchain | ||
|
|
||
| Windows 10 and 11 ship an OpenSSH client in `C:\Windows\System32\OpenSSH\`, and |
|
|
||
| Prerequisite: | ||
| - QEMU (Required, only if [QEMU]({{< ref "/docs/config/vmtype#qemu" >}}) driver is used) | ||
| - An OpenSSH client on Windows hosts (Windows 10 and 11 ship one); see |
| belongs to OpenSSH Server, an [optional Feature on Demand](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse). | ||
| Install it from an elevated PowerShell with | ||
| `Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0`. Without it | ||
| `sshocker` serves the mount in-process, so the mount still works. But pinning |
There was a problem hiding this comment.
What is the problem of using in-process SFTP server?
| `sftpDriver: openssh-sftp-server` under a mount's [`sshfs`]({{< ref "/docs/config/mount#reverse-sshfs" >}}) | ||
| drops that fallback, and then the mount fails. | ||
|
|
||
| [Git for Windows](https://gitforwindows.org/) (`winget install -e --id Git.Git`) |
| `System32\OpenSSH`. Lima then takes the `sftp-server` from that toolchain, and | ||
| writes the key and socket paths it hands `ssh` in the form that toolchain | ||
| expects. MSYS2 and Git for Windows get `cygpath`'s `/c/Users/USER`, stock | ||
| Cygwin `/cygdrive/c/Users/USER`, and the native client `C:/Users/USER`. |
There was a problem hiding this comment.
These details could be moved to https://lima-vm.io/docs/dev/internals/
|
|
||
| A mount without an explicit `mountPoint` derives its guest path from `cygpath` | ||
| on every load, so adding stock Cygwin to `PATH` can move an existing instance's | ||
| mount inside the guest. Set `mountPoint` to pin it. |
There was a problem hiding this comment.
These details could be moved to https://lima-vm.io/docs/dev/internals/
AkihiroSuda
left a comment
There was a problem hiding this comment.
Thanks, but I still think we should prioritize readability over amount of the documentation.
Details can be still documented in <details> or in https://lima-vm.io/docs/dev/internals/
Document the host SSH toolchain now that Lima supports native Windows OpenSSH: which binaries ship by default, why to prefer full Git for Windows over MinGit, and how the Cygwin-vs-native path form is chosen. Also replaces the Known Issues bullet that claimed Windows ships no
ssh.exe, since onlyxz,bzip2, andzstdrootfs archives still need an external binary.This describes the state after #5299 and #5300 land, so it should merge after them. Merging it first would publish toolchain behaviour that master does not yet have.
paths-ignorein test.yml keeps the test workflow off this PR, but lint-quick.yml has no such filter and does run.