From 9b46479410b1914ab919be544b36c4eba9d9ff30 Mon Sep 17 00:00:00 2001 From: miampf Date: Wed, 16 Apr 2025 16:08:27 +0200 Subject: [PATCH] fix: please openssh by using their format, specifically --- internal/crypto/crypto.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/crypto/crypto.go b/internal/crypto/crypto.go index b302ed658..2eafd35c0 100644 --- a/internal/crypto/crypto.go +++ b/internal/crypto/crypto.go @@ -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,