Skip to content

Commit b1a297d

Browse files
author
Matthew Fisher
committed
ref(pkg/sshd): remove host key parsing logic
ssh-keygen no longer creates these keys as of alpine 3.2
1 parent 0ca7225 commit b1a297d

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

pkg/sshd/sshd.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,6 @@ func ParseHostKeys(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Inte
4545
}
4646
}
4747
}
48-
if c.Get("enableV1", false).(bool) {
49-
path := "/etc/ssh/ssh_host_key"
50-
if key, err := ioutil.ReadFile(path); err != nil {
51-
log.Errf(c, "Failed to read ssh_host_key")
52-
} else if hk, err := ssh.ParsePrivateKey(key); err == nil {
53-
log.Infof(c, "Parsed host key %s.", path)
54-
hostKeys = append(hostKeys, hk)
55-
} else {
56-
log.Errf(c, "Failed to parse host key %s: %s", path, err)
57-
}
58-
}
5948
return hostKeys, nil
6049
}
6150

0 commit comments

Comments
 (0)