Skip to content

feat(agent/agentssh): use tcp for X11 forwarding #14560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Sep 4, 2024

This PR changes X11 forwarding from socket-based to TCP based. This matches OpenSSH behavior where the client forwards from /tmp/.X11-unix/X* and the server listens on localhost:6000(+).

Since we can now have multiple SSH connections that each handle their individual X11 forwarding, we can end up adding more non-duplicate entries into ~/.Xauthority as well. Ideally we would clean our entries up when the connection closes, but that's more of a nice-to-have and not part of this PR.

Note that X11 forwarding is still only supported by OpenSSH clients (coder config-ssh), this PR did not add X11 forwarding support to coder ssh.

Fixes #14198

@mafredri mafredri force-pushed the mafredri/x11-forwarding-ports branch 3 times, most recently from 9d3f404 to 8fdf92f Compare September 4, 2024 13:35
@mafredri mafredri force-pushed the mafredri/x11-forwarding-ports branch from 8fdf92f to f6f2964 Compare September 4, 2024 14:29
@mafredri mafredri marked this pull request as ready for review September 4, 2024 14:32
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing else blocking on my end!

@mafredri mafredri merged commit 8f07d33 into main Sep 4, 2024
26 checks passed
@mafredri mafredri deleted the mafredri/x11-forwarding-ports branch September 4, 2024 17:06
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X11 forwarding should use network instead of unix socket and support being forwarded multiple times
2 participants