Skip to content

SSH client not working on Windows due to invalid pipe path #6639

@Mansarde

Description

@Mansarde

What is the issue?

On Windows, connecting to one of my Tailnet machines via an SSH client (e.g. PuTTY) works without any problems.

But when I try to connect to that machine via the tailscale ssh command though, then I get the following error message:

failed to connect to local tailscaled (which appears to be running as tailscaled.exe, pid 21916). Got error: Get "http://local-tailscaled.sock/localapi/v0/status": open \\\\.\\pipe\\ProtectedPrefix\\Administrators\\Tailscale\\tailscaled: The specified path is invalid.

 
It can't be the case that the path doesn't exist, because the error message for a non-existing path would be The system cannot find the file specified..
I confirmed this by verifying that the pipe does indeed exist on my system (via the PowerShell command (Get-ChildItem \\.\pipe\).FullName).

 
The only thing I can imagine is that the escaped backslashes of the pipe path (as shown in the error message) aren't just in the error message, but are exactly how Tailscale tried to access the pipe.

So I googled around until I found someone who had a similar problem with pipes that were escaped incorrectly:
rlivings39/vscode-fzf-quick-open#23

 
Could this be a similar problem here?
Perhaps tailscale ssh on Windows unnecessarily escapes the pipe (i.e. turning \'s to \\'s) when trying to communicate with it?

Steps to reproduce

  1. Create a tailnet with one Windows machine and one Linux machine.
  2. Enable/advertise SSH on the Linux machine via tailscale up --ssh.
  3. From the windows machine, confirm that you can connect to the Linux machine via an SSH client (like PuTTY).
  4. Then from a console on the Windows machine, try to connect via the tailscale ssh command (e.g.: tailscale ssh root@linux-box).

Result:
It will fail with the error message as mentioned in the isse description above.

Are there any recent changes that introduced the issue?

No response

OS

Linux, Windows

OS version

Windows 10 Pro 22H2 19045.2311, Ubuntu 22.04 LTS

Tailscale version

1.34.0

Bug report

BUG-6adf97a70915dec675da100fb304a9b92866b88058952bb3deac5c87fc1296c2-20221206182828Z-3123bcfffdccfc00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions