fix: please openssh by using their format, specifically

This commit is contained in:
miampf 2025-04-16 16:08:27 +02:00
parent 77e3f90155
commit 9b46479410
No known key found for this signature in database
GPG Key ID: EF039364B5B6886C

View File

@ -88,11 +88,10 @@ func GenerateSignedSSHHostKey(principal string, ca ssh.Signer) (*pem.Block, *ssh
if err != nil {
return nil, nil, err
}
hostKeySSH, err := x509.MarshalPKCS8PrivateKey(hostKey)
pemHostKey, err := ssh.MarshalPrivateKey(hostKey, "")
if err != nil {
return nil, nil, err
}
pemHostKey := &pem.Block{Type: "PRIVATE KEY", Bytes: hostKeySSH}
certificate := ssh.Certificate{
CertType: ssh.HostCert,