Skip to content
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

FR: make Tailscale SSH port forwarding work with unix socket #6232

Open
grant0417 opened this issue Nov 8, 2022 · 8 comments · May be fixed by #12081
Open

FR: make Tailscale SSH port forwarding work with unix socket #6232

grant0417 opened this issue Nov 8, 2022 · 8 comments · May be fixed by #12081
Labels
fr Feature request L1 Very few Likelihood OS-linux P2 Aggravating Priority level ssh Relating to Tailscale SSH https://tailscale.com/blog/tailscale-ssh/ T0 New feature Issue type

Comments

@grant0417
Copy link

grant0417 commented Nov 8, 2022

What is the issue?

When using the RemoteForward with a Unix domain socket over Tailscale SSH it fails with the following error given the following config:

Config:

RemoteForward /tmp/test.socket /tmp/test.socket

Error on connect:

Warning: remote port forwarding failed for listen path /tmp/test.socket

Steps to reproduce

Run the following

ssh -o 'RemoteForward /tmp/test.socket /tmp/test.socket' user@remote

Are there any recent changes that introduced the issue?

No response

OS

Linux, macOS

OS version

No response

Tailscale version

1.32.2

Bug report

No response

@DentonGentry DentonGentry changed the title Remote port does not work for unix socket (Tailscale SSH) Tailscale SSH RemoteForward does not work for unix socket Nov 9, 2022
@DentonGentry DentonGentry added OS-linux L1 Very few Likelihood P2 Aggravating Priority level T5 Usability Issue type ssh Relating to Tailscale SSH https://tailscale.com/blog/tailscale-ssh/ and removed needs-triage labels Nov 9, 2022
@DentonGentry DentonGentry changed the title Tailscale SSH RemoteForward does not work for unix socket Tailscale SSH local/remote port forwarding does not work with unix socket Dec 3, 2022
@everpeace
Copy link

When using the RemoteForward with a Unix domain socket

This is widely used in forwarding gpg-agent. This feature is required when signing git commits in remote server by using local gpg keys.

ref: https://wiki.gnupg.org/AgentForwarding

@DentonGentry DentonGentry added fr Feature request and removed bug Bug labels Jun 3, 2023
@DentonGentry DentonGentry changed the title Tailscale SSH local/remote port forwarding does not work with unix socket FR: make Tailscale SSH port forwarding work with unix socket Jun 3, 2023
@DentonGentry DentonGentry added T0 New feature Issue type and removed T5 Usability Issue type labels Jun 3, 2023
@nward
Copy link

nward commented Jun 4, 2023

I had noted in #8262 that gliderlabs/ssh has a PR to implement this, so adding here as I think it's going to be useful: gliderlabs/ssh#196

Thanks!

@deansheather
Copy link

My PR on the gliderlabs repo is stalled, but I had to integrate this into a repo at Coder which is open source here: https://github.com/coder/coder/blob/2c0f653aa85ab4d2c4be410642776c772eb524ac/agent/agentssh/forward.go

Should be very easy to copy that into Tailscale and plumb it up to the gliderlabs SSH server.

@Xenfo
Copy link

Xenfo commented May 9, 2024

Hey, it's been quite a while and this feature is essential for a lot of remote developers. Is there any progress on this issue? Thanks for the amazing work!

@deansheather
Copy link

I'm totally OK with someone copying my code and opening a PR to update tailscale's SSH tempfork.

@Xenfo
Copy link

Xenfo commented May 9, 2024

I'd be willing to take a stab at it sometime soon, can't guarantee I'll actually succeed since my knowledge is limited to the copy paste xD. Essentially though, I just merge gliderlabs/ssh#196 into Tailscale's temp fork right?

@Xenfo
Copy link

Xenfo commented May 9, 2024

So I've managed to fix the Warning: remote port forwarding failed for listen path /tmp/test.socket message but GPG forwarding isn't really working for me. I'm trying to double check if this is my fault or a problem with my implementation.

If anyone with a known working setup would be able to test https://github.com/Xenfo/tailscale, I'd appreciate it.

@Xenfo
Copy link

Xenfo commented May 10, 2024

Great news! I got it working for the most part, the final issue was with permissions. Now I'm going to properly implement the checks for security and get a PR up.

@Xenfo Xenfo linked a pull request May 10, 2024 that will close this issue
Xenfo added a commit to Xenfo/tailscale that referenced this issue May 10, 2024
Updates tailscale#6232
Signed-off-by: Samuel Corsi-House <chouse.samuel@gmail.com>
Xenfo added a commit to Xenfo/tailscale that referenced this issue May 10, 2024
Updates tailscale#6232
Signed-off-by: Samuel Corsi-House <chouse.samuel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fr Feature request L1 Very few Likelihood OS-linux P2 Aggravating Priority level ssh Relating to Tailscale SSH https://tailscale.com/blog/tailscale-ssh/ T0 New feature Issue type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants