Repository navigation
|
I have a mix of Linux boxes and one Windows Server 2022 host running OpenSSH. The Linux
'timeout' is not recognized as an internal or external command Plain Is there something to configure for Windows targets, or is it just not supported? |
Replies: 1 comment
|
It's supported, there's just one setting you have to declare — and it can't be auto-detected, since there's no reliable way to know a remote host's OS before running something on it. So the default is Linux, and your Windows box is being treated as one. Add this to the server: SSH_SERVER_WINBOX_PLATFORM=windowsor That error message is the giveaway. For Linux targets commands get wrapped for timeout enforcement, roughly Same reason You can check it took with Worth saying since it catches people the other way round too: And if you're on an older release, upgrade first ( Also — two in one morning 🙂 If you've got more piled up, don't hold back, send them all at once. I'll do you a bulk discount. |
It's supported, there's just one setting you have to declare — and it can't be auto-detected, since there's no reliable way to know a remote host's OS before running something on it. So the default is Linux, and your Windows box is being treated as one.
Add this to the server:
or
platform = "windows"if you're using the TOML format.That error message is the giveaway. For Linux targets commands get wrapped for timeout enforcement, roughly
timeout <n> sh -c '<your command>'— and neithertimeoutnorshexists on Windows OpenSSH, so your command never actually runs. Onceplatformis set, that wrapper is skipped and the SSH library's own timeout is used ins…