Skip to content

Commit f948d68

Browse files
author
Matthew Fisher
committed
ref(pkg): remove GenSSHKeys
These keys are now supplied through a kubernetes secret, so we no longer need to generate them ourselves.
1 parent b1a297d commit f948d68

2 files changed

Lines changed: 1 addition & 18 deletions

File tree

pkg/routes.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ func routes(reg *cookoo.Registry) {
2020
Help: "Boot the builder",
2121
Does: []cookoo.Task{
2222

23-
// SSHD: Create and configure host keys.
24-
cookoo.Cmd{
25-
Name: "installSshHostKeys",
26-
Fn: sshd.GenSSHKeys,
27-
},
23+
// SSHD: Configure host keys.
2824
cookoo.Cmd{
2925
Name: sshd.HostKeys,
3026
Fn: sshd.ParseHostKeys,

pkg/sshd/sshd.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package sshd
33
import (
44
"fmt"
55
"io/ioutil"
6-
"os/exec"
76

87
"golang.org/x/crypto/ssh"
98

@@ -104,15 +103,3 @@ func Configure(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrup
104103

105104
return cfg, nil
106105
}
107-
108-
// GenSSHKeys generates the default set of SSH host keys.
109-
func GenSSHKeys(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) {
110-
log.Debugf(c, "Generating ssh keys for sshd")
111-
// Generate a new key
112-
out, err := exec.Command("ssh-keygen", "-A").CombinedOutput()
113-
if err != nil {
114-
log.Infof(c, "ssh-keygen: %s", out)
115-
return nil, err
116-
}
117-
return nil, nil
118-
}

0 commit comments

Comments
 (0)