fix: template white spaces

This commit is contained in:
Bexanderthebex 2022-11-16 17:32:49 +08:00
parent 4ed811a931
commit 9f51debc82
No known key found for this signature in database
GPG Key ID: 4B385F6608A1FA8B
1 changed files with 7 additions and 9 deletions

View File

@ -39,22 +39,20 @@ const (
Add to your {{.Home}}/.ssh/config:
{{- if .ShortLivedCerts}}
{{- if eq .OS "windows"}}
ProxyCommand {{.Cloudflared}} access ssh-gen --hostname %h && ssh -tt %r@cfpipe-{{.Hostname}} >&2 <&1
{{- else}}
{{- if eq .OS "windows"}}
ProxyCommand {{.Cloudflared}} access ssh-gen --hostname %h && ssh -tt %r@cfpipe-{{.Hostname}} >&2 <&1
{{- else}}
ProxyCommand bash -c '{{.Cloudflared}} access ssh-gen --hostname %h; ssh -tt %r@cfpipe-{{.Hostname}} >&2 <&1'
{{end}}
{{end}}
Host cfpipe-{{.Hostname}}
HostName {{.Hostname}}
ProxyCommand {{.Cloudflared}} access ssh --hostname %h
{{- if eq .OS "windows"}}
IdentityFile {{.CurrWorkingDir}}/{{.Hostname}}-cf_key
{{- if eq .OS "windows"}} IdentityFile {{.CurrWorkingDir}}/{{.Hostname}}-cf_key
CertificateFile {{.CurrWorkingDir}}/{{.Hostname}}-cf_key-cert.pub
{{- else}}
IdentityFile ~/.cloudflared/{{.Hostname}}-cf_key
{{- else}} IdentityFile ~/.cloudflared/{{.Hostname}}-cf_key
CertificateFile ~/.cloudflared/{{.Hostname}}-cf_key-cert.pub
{{end}}
{{end}}
{{- else}}
Host {{.Hostname}}
ProxyCommand {{.Cloudflared}} access ssh --hostname %h