Skip to content

Commit 0ca7225

Browse files
author
Matthew Fisher
committed
ref(rootfs): reference ssh host keys from kubernetes secret
1 parent 1c37d86 commit 0ca7225

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/sshd/sshd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const (
3131
func ParseHostKeys(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) {
3232
log.Debugf(c, "Parsing ssh host keys")
3333
hostKeyTypes := p.Get("keytypes", []string{"rsa", "dsa", "ecdsa"}).([]string)
34-
pathTpl := p.Get("path", "/etc/ssh/ssh_host_%s_key").(string)
34+
pathTpl := p.Get("path", "/var/run/secrets/deis/builder/ssh/ssh-host-%s-key").(string)
3535
hostKeys := make([]ssh.Signer, 0, len(hostKeyTypes))
3636
for _, t := range hostKeyTypes {
3737
path := fmt.Sprintf(pathTpl, t)

rootfs/etc/ssh/sshd_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Port 2223
22
Protocol 2
3-
HostKey /etc/ssh/ssh_host_rsa_key
4-
HostKey /etc/ssh/ssh_host_dsa_key
5-
HostKey /etc/ssh/ssh_host_ecdsa_key
3+
HostKey /var/run/secrets/deis/builder/ssh/ssh-host-rsa-key
4+
HostKey /var/run/secrets/deis/builder/ssh/ssh-host-dsa-key
5+
HostKey /var/run/secrets/deis/builder/ssh/ssh-host-ecdsa-key
66
UsePrivilegeSeparation yes
77
KeyRegenerationInterval 3600
88
ServerKeyBits 768

0 commit comments

Comments
 (0)