Update ca host config
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
This commit is contained in:
BIN
services/ca/templates/ssh/ca.tpl
Normal file
BIN
services/ca/templates/ssh/ca.tpl
Normal file
Binary file not shown.
14
services/ca/templates/ssh/config.tpl
Normal file
14
services/ca/templates/ssh/config.tpl
Normal file
@@ -0,0 +1,14 @@
|
||||
Host *
|
||||
{{- if or .User.GOOS "none" | eq "windows" }}
|
||||
{{- if .User.StepBasePath }}
|
||||
Include "{{ .User.StepBasePath | replace "\\" "/" | trimPrefix "C:" }}/ssh/includes"
|
||||
{{- else }}
|
||||
Include "{{ .User.StepPath | replace "\\" "/" | trimPrefix "C:" }}/ssh/includes"
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- if .User.StepBasePath }}
|
||||
Include "{{.User.StepBasePath}}/ssh/includes"
|
||||
{{- else }}
|
||||
Include "{{.User.StepPath}}/ssh/includes"
|
||||
{{- end }}
|
||||
{{- end }}
|
4
services/ca/templates/ssh/known_hosts.tpl
Normal file
4
services/ca/templates/ssh/known_hosts.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
@cert-authority * {{.Step.SSH.HostKey.Type}} {{.Step.SSH.HostKey.Marshal | toString | b64enc}}
|
||||
{{- range .Step.SSH.HostFederatedKeys}}
|
||||
@cert-authority * {{.Type}} {{.Marshal | toString | b64enc}}
|
||||
{{- end }}
|
4
services/ca/templates/ssh/sshd_config.tpl
Normal file
4
services/ca/templates/ssh/sshd_config.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
Match all
|
||||
TrustedUserCAKeys /etc/ssh/ca.pub
|
||||
HostCertificate /etc/ssh/{{.User.Certificate}}
|
||||
HostKey /etc/ssh/{{.User.Key}}
|
11
services/ca/templates/ssh/step_config.tpl
Normal file
11
services/ca/templates/ssh/step_config.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
Match exec "step ssh check-host{{- if .User.Context }} --context {{ .User.Context }}{{- end }} %h"
|
||||
{{- if .User.User }}
|
||||
User {{.User.User}}
|
||||
{{- end }}
|
||||
{{- if or .User.GOOS "none" | eq "windows" }}
|
||||
UserKnownHostsFile "{{.User.StepPath}}\ssh\known_hosts"
|
||||
ProxyCommand C:\Windows\System32\cmd.exe /c step ssh proxycommand{{- if .User.Context }} --context {{ .User.Context }}{{- end }}{{- if .User.Provisioner }} --provisioner {{ .User.Provisioner }}{{- end }} %r %h %p
|
||||
{{- else }}
|
||||
UserKnownHostsFile "{{.User.StepPath}}/ssh/known_hosts"
|
||||
ProxyCommand step ssh proxycommand{{- if .User.Context }} --context {{ .User.Context }}{{- end }}{{- if .User.Provisioner }} --provisioner {{ .User.Provisioner }}{{- end }} %r %h %p
|
||||
{{- end }}
|
1
services/ca/templates/ssh/step_includes.tpl
Normal file
1
services/ca/templates/ssh/step_includes.tpl
Normal file
@@ -0,0 +1 @@
|
||||
{{- if or .User.GOOS "none" | eq "windows" }}Include "{{ .User.StepPath | replace "\\" "/" | trimPrefix "C:" }}/ssh/config"{{- else }}Include "{{.User.StepPath}}/ssh/config"{{- end }}
|
Reference in New Issue
Block a user