tailscale: ssh X11 forwarding doesn't work
What is the issue?
I have two existing machines where X11 forwarding over ssh is working (without tailscale enabled at all). After installing tailscale and enabling tailscale ssh, attempting to use the same workflow, X11 forwarding no longer works.
Steps to reproduce
$ ssh -X host
X11 forwarding request failed on channel 0
Are there any recent changes that introduced the issue?
No response
OS
Linux
OS version
nixos unstable
Tailscale version
1.28.0
Bug report
BUG-1fbfdf798d35403dafe07fe51ffc616e6a1bb362e39d27608cd037d2dc6eda8b-20220724222054Z-7b30aeacf093624b
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 49
- Comments: 32 (7 by maintainers)
I’ve come across this issue as well and distilled it down to this command (without any changes to
.ssh/config:As noted, by fgergo, this will need a normal sshd listening on 127.0.0.1, but that’s a pretty normal setup anyway. Replace the
ubuntuuser with whatever you use on your machine. As a sidenote, I also neededexport XAUTHORITY=$HOME/.Xauthorityfor firefox to work, but that’s a different issue.Just discovered a trick and it works for me with this workaround!
If a search brought you here, to summarize: At the moment the built-in “tailscale-sshd” is not enough to run “tailcale-sshd” connected remote X11 applications displaying on the local X Display.
The ~/.ssh/config based workaround above will only work if you have a separate sshd running on the remote machine doing everything an X11 application needs.
Dude you saved my life. Thank you!
Unfortunately this still doesn’t work. I’ve tried with Win10 Enterprise and the X410 X server trying to connect to ubuntu 22.04 / tailscale 1.46. No DISPLAY variable is passed through to the tailnode.
Also getting the X11 forwarding request failed on channel 0 error on MacM1 to Ubuntu
From an internal discussion: “it looks like it’s probably similar in scope to adding port forwarding. Namely, there’s a new channel type “x11” per X11 client connection and also a “x11-req” channel request on a “session” channel is required first in order to pass along metadata like authn setup. Adding a new channel type looks easy (but it’ll need to speak a bit of X11 to handle authn, maybe there’s a Go package for that) but the upstream SSH package doesn’t have a way to handle new channel requests on “session” channels, so that’ll take a bit of extra work.”