Skip to content

fix: refuse a forced tty where sftp and captured output run - #32

Merged
uhs-robert merged 1 commit into
mainfrom
fix/request-tty
Sep 11, 2026
Merged

uhs-robert merged 1 commit into
mainfrom
fix/request-tty

Conversation

@uhs-robert

Copy link
Copy Markdown
Owner

Same class as #27, verified against a real sshd rather than reasoned about.

RequestTTY force in ssh_config closes the sftp channel: sftp reports Connection closed and sshfs fails with remote host has disconnected, never mounting. Adding -o RequestTTY=no to the ssh command mounts fine. A forced tty would also put carriage returns into the remote-home readlink output.

Applied to the batch and socket paths only. Interactive authentication keeps its tty, since a password prompt needs one, as does :SSHTerminal.

Verified end to end with a user-level sshd on 127.0.0.1:2222 — mount fails with the directive, succeeds with the override.

RequestTTY force in ssh_config closes the sftp channel, so the mount fails
with "remote host has disconnected", and a tty would also put carriage
returns in the remote-home output. Interactive paths still get their tty.
@uhs-robert
uhs-robert merged commit b4ee53d into main Sep 11, 2026
3 checks passed
@uhs-robert
uhs-robert deleted the fix/request-tty branch September 11, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant