You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Fileless execution (Clients support dynamically downloading executables to execute as shell)](#fileless-execution-clients-support-dynamically-downloading-executables-to-execute-as-shell)
69
69
-[Supported URI Schemes](#supported-uri-schemes)
70
70
-[Help](#help)
71
-
-[Windows and SFTP](#windows-and-sftp)
71
+
-[Windows](#windows-help)
72
+
-[SFTP](#windows-and-sftp)
73
+
-[Error ]()
72
74
-[Server started with `--insecure` still has `Failed to handshake`](#server-started-with---insecure-still-has-failed-to-handshake)
73
75
-[Foreground vs Background](#foreground-vs-background)
74
76
-[Donations, Support, or Giving Back](#donations-support-or-giving-back)
@@ -433,7 +435,9 @@ Both of these methods will opportunistically use [memfd](https://man7.org/linux/
433
435
434
436
# Help
435
437
436
-
## Windows and SFTP
438
+
## Windows
439
+
440
+
### SFTP
437
441
438
442
Due to the limitations of SFTP (or rather the library Im using for it). Paths need a little more effort on windows.
2025/08/24 18:25:39 [client] INFO shell_windows.go:137 runWithConpty() : New process with pid 3427 spawned
463
+
2025/08/24 18:25:39 [client] INFO session.go:122 func16() : Session disconnected
464
+
```
465
+
466
+
There are two common causes for this, the first being antivirus has killed the spawned powershell, and the other `0xc0000142` is when the resulting process does not have the permissions to access the Windows Station or Desktop [source](https://stackoverflow.com/questions/677874/starting-a-process-with-credentials-from-a-windows-service/30687230#30687230).
467
+
468
+
469
+
To determine which is causing this issue, execute any command without a pty:
470
+
471
+
```sh
472
+
ssh -J rssh windows-system cmd /c dir
473
+
exit status 0xc0000142
474
+
```
475
+
476
+
If you see the `0xc0000142` error code try starting `CMD.exe` and force allocating a pty (`-t`):
477
+
478
+
```sh
479
+
ssh -t -J rssh windows-system CMD.exe
480
+
```
481
+
482
+
This should start an interactive shell.
483
+
446
484
## Server started with `--insecure` still has `Failed to handshake`
447
485
448
486
If the client binary was generated with the `link` command this client has the server public key fingerprint baked in by default. If you lose your server private key, the clients will no longer be able to connect.
0 commit comments