From 1ca841d22076f980a3454829c2302289c523d1ca Mon Sep 17 00:00:00 2001 From: Austin Cherry Date: Mon, 3 Jun 2019 10:35:07 -0500 Subject: [PATCH] AUTH-1811: ssh-gen config fixes --- cmd/cloudflared/access/cmd.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/cloudflared/access/cmd.go b/cmd/cloudflared/access/cmd.go index ede81c6c..dde26b3f 100644 --- a/cmd/cloudflared/access/cmd.go +++ b/cmd/cloudflared/access/cmd.go @@ -27,19 +27,19 @@ const ( sshTokenSecretFlag = "service-token-secret" sshGenCertFlag = "short-lived-cert" sshConfigTemplate = ` -Add this configuration block to your {{.Home}}/.ssh/config: +Add to your {{.Home}}/.ssh/config: Host {{.Hostname}} {{- if .ShortLivedCerts}} - ProxyCommand bash -c '{{.Cloudflared}} access ssh-gen --hostname %h; ssh -tt cfpipe-{{.Hostname}} >&2 <&1' + ProxyCommand bash -c '{{.Cloudflared}} access ssh-gen --hostname %h; ssh -tt %r@cfpipe-{{.Hostname}} >&2 <&1' Host cfpipe-{{.Hostname}} - HostName {{.Hostname}} - ProxyCommand {{.Cloudflared}} access ssh --hostname %h - IdentityFile ~/.cloudflared/{{.Hostname}}.me-cf_key - CertificateFile ~/.cloudflared/{{.Hostname}}-cf_key-cert.pub + HostName {{.Hostname}} + ProxyCommand {{.Cloudflared}} access ssh --hostname %h + IdentityFile ~/.cloudflared/{{.Hostname}}-cf_key + CertificateFile ~/.cloudflared/{{.Hostname}}-cf_key-cert.pub {{- else}} - ProxyCommand {{.Cloudflared}} access ssh --hostname %h + ProxyCommand {{.Cloudflared}} access ssh --hostname %h {{end}} ` )