cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

🐛 ssh-config is generated for Linux despite installing the Windows version

Open y2k04 opened this issue 2 years ago • 7 comments

Describe the bug If you do cloudflared access ssh-config --hostname [hostname] --short-lived-cert on Windows, it will create an ssh config entry made for Linux.

To Reproduce Steps to reproduce the behavior:

  1. Run cloudflared access ssh-config --hostname [hostname] --short-lived-cert on Windows
  2. It will generate a config for a Linux OS, not Windows.

Expected behavior It is meant to create an ssh config for Windows.

Environment and versions

  • OS: Windows
  • Architecture: x64
  • Version: 22H2 (22622.586)

Logs and errors image

Additional context N/A

y2k04 avatar Sep 11 '22 01:09 y2k04

Is this because the default shell for windows is not bash but could be powershell or something similar? I'd like to help but would like to brainstorm and make sure I understand the problem correctly first

Bexanderthebex avatar Oct 27 '22 15:10 Bexanderthebex

It doesn't have to do with the default shell for Windows, it is just how cloudflared was ported to Windows. It is just a small oversight by the developers, nothing big. "Should be easy" to fix this issue. It's just as "simple" as checking the operating system, OR, hard coding it for the specific release, whether it is for Linux and MacOS or Windows.

y2k04 avatar Oct 28 '22 02:10 y2k04

@y2k04 yeah what exact config is tripping it of is what I am trying to find out.

Bexanderthebex avatar Oct 28 '22 02:10 Bexanderthebex

When it generates the config, it specifies the shell as bash, even though I ran it under Windows, not WSL or a VM or Docker.

y2k04 avatar Oct 28 '22 02:10 y2k04

@y2k04 that is exactly what I was referring to earlier...

Bexanderthebex avatar Oct 28 '22 02:10 Bexanderthebex

Could you please rephrase the question?

y2k04 avatar Oct 28 '22 02:10 y2k04

I think it would close the issue :3

y2k04 avatar Mar 03 '23 04:03 y2k04