mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-22 15:00:38 -04:00
feat: use SSH host certificates (#3786)
This commit is contained in:
parent
95f17a6d06
commit
7ea5c41f9b
34 changed files with 706 additions and 117 deletions
|
@ -74,7 +74,12 @@ func writeCertificateForKey(cmd *cobra.Command, keyPath string, fh file.Handler,
|
|||
return fmt.Errorf("generating SSH emergency CA key: %s", err)
|
||||
}
|
||||
|
||||
debugLogger.Debug("SSH CA KEY generated", "public-key", string(ssh.MarshalAuthorizedKey(ca.PublicKey())))
|
||||
marshalledKey := string(ssh.MarshalAuthorizedKey(ca.PublicKey()))
|
||||
debugLogger.Debug("SSH CA KEY generated", "public-key", marshalledKey)
|
||||
knownHostsContent := fmt.Sprintf("@cert-authority * %s", marshalledKey)
|
||||
if err := fh.Write("./known_hosts", []byte(knownHostsContent), file.OptMkdirAll); err != nil {
|
||||
return fmt.Errorf("writing known hosts file: %w", err)
|
||||
}
|
||||
|
||||
keyBuffer, err := fh.Read(keyPath)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue