cloudflare / cloudflare/cloudflared

Can't connect via short lived certificate to ssh tunnel on windows

Open
#584 2 comments 0 reactions 0 assignees View on GitHub
Area: Access Needs clarification OS: Windows Type: Bug
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
My ssh tunnel is running via cloudflared on a ubuntu server.
it's at ssh.mydomain.com

I downloaded cloudflared binary on windows and added it to path.
According to instructions from here. https://developers.cloudflare.com/cloudflare-one/identity/users/short-lived-certificates

This command
```cloudflared access ssh-config --hostname ssh.mydomain.com --short-lived-cert```
gave me the following config to add to my ssh config..
```
Host ssh.mydomain.com
ProxyCommand bash -c 'cloudflared access ssh-gen --hostname %h; ssh -tt %r@cfpipe-ssh.mydomain.com >&2 <&1'

Host cfpipe-ssh.mydomain.com
HostName ssh.mydomain.com
ProxyCommand cloudflared access ssh --hostname %h
IdentityFile ~/.cloudflared/ssh.mydomain.com-cf_key
CertificateFile ~/.cloudflared/ssh.mydomain.com-cf_key-cert.pub
```
After adding that to config, and running the following command
```
ssh ssh.mydomain.com
```
It just gets stuck at terminal with no response or error.

Now I have several doubts,
1. this extra cfpipe-ssh.mydomain.com domain, do I need to create an entry for it in my Cloudflare dashboard.?
2. this ssh config is using bash in the first part, which runs via WSL...can't I just use the native windows cloudflared binary for everything?

**Expected behavior**
It should connect to my tunnel.

**Environment and versions**
- OS: Windows
- Architecture: x86 Ryzen 5 3550h
- Version: 2022.2.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.