cloudflared
cloudflared copied to clipboard
fix: add windows specific ssh-config
This attempts to fix https://github.com/cloudflare/cloudflared/issues/753
The bug occurs because windows executable uses the current working directory to do its operations while the ssh-config being generated assumes that:
- the user uses a nix machine
- the nix executable follows a different installation directory than windows. Windows uses the relative path, the nix binary gets stored in
~/.cloudflared
@GreenStage thank you for taking a look. I did the changes on my windows partition and forget about the spacing (I don't use it a lot) so thank you for noticing that.
@jroyal wonder if you can take a look?
Generated
Host cfpipe-ssh.hotdogs.beauty
ProxyCommand C:\Users\EduardoGomes\cloudflared\cloudflared.exe access ssh-gen --hostname %h && ssh -tt %[email protected] >&2 <&1
Host cfpipe-ssh.hotdogs.beauty
HostName ssh.hotdogs.beauty
ProxyCommand C:\Users\EduardoGomes\cloudflared\cloudflared.exe access ssh --hostname %h IdentityFile <REDACTED>
CertificateFile <REDACTED>
after which, I got timedout when sshing to my remote machine
C:\Users\EduardoGomes>ssh -v ssh.hotdogs.beauty
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Reading configuration data C:\\Users\\EduardoGomes/.ssh/config
debug1: Connecting to ssh.hotdogs.beauty [172.67.201.145] port 22.
debug1: connect to address 104.21.52.171 port 22: Connection timed out
Feel free to rebase and reopen it if it's still relevant.