You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ssh/tailssh
James Tucker e9a28ff0db
ssh/tailssh: fix exit-status ordering and improve signal/exit code handling
Fixes a race where CloseWrite() could be called before Exit(), causing
SSH clients (especially on macOS) to miss the exit status. Simplified
run() to use sync.WaitGroup and guarantee Exit() is sent before EOF per
RFC 4254 section 6.10.

Also:
- Send SIGHUP instead of SIGKILL on session termination
- Use exit code 127 for command not found
- Use exit code 255 for SSH permission/protocol errors
- Use exit code 254 for recording failures
- Complete TCP handlers only after I/O completes

Fixes tailscale/tailscale#18256

Signed-off-by: James Tucker <james@tailscale.com>
1 week ago
..
testcontainers ssh/tailssh: accept passwords and public keys 11 months ago
accept_env.go ssh: Add logic to set accepted environment variables in SSH session (#13559) 1 year ago
accept_env_test.go ssh: Add logic to set accepted environment variables in SSH session (#13559) 1 year ago
incubator.go ssh/tailssh: fix incubator tests on macOS arm64 2 months ago
incubator_linux.go ssh/tailssh: exclude Android from Linux build tags 8 months ago
incubator_plan9.go ssh/tailssh: add Plan 9 support for Tailscale SSH 10 months ago
privs_test.go ssh/tailssh: only chdir incubator process to user's homedir when necessary and possible 1 year ago
tailssh.go ssh/tailssh: fix exit-status ordering and improve signal/exit code handling 1 week ago
tailssh_integration_test.go ssh/tailssh: accept passwords and public keys 11 months ago
tailssh_test.go ssh/tailssh: mark TestSSHRecordingCancelsSessionsOnUploadFailure as flaky 4 months ago
user.go ssh/tailssh: exclude Android from Linux build tags 8 months ago