summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-08-07 15:28:39 +0300
committerLars Wirzenius <liw@liw.fi>2022-08-07 15:28:39 +0300
commit200ff0abf534d604944ce9a3dad6dbb9cd0a0af2 (patch)
tree869a1efee50b3756addf9ee87654b72c17a7fa7b
parent4a1c88ea93a9f3800e6139d515e27f2cad0680ab (diff)
downloadv-i-200ff0abf534d604944ce9a3dad6dbb9cd0a0af2.tar.gz
fix: allow ed25519 for certificates, otherwise certs don't work
Sponsored-by: author
-rwxr-xr-xconfigure-installer7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure-installer b/configure-installer
index 7596c28..e52aa19 100755
--- a/configure-installer
+++ b/configure-installer
@@ -1,6 +1,7 @@
#!/usr/bin/python3
import argparse
+import glob
import os
import subprocess
import tempfile
@@ -86,11 +87,15 @@ def host_id(config, mp):
host_key = "/etc/ssh/ssh_host_key"
host_cert = "/etc/ssh/ssh_host_key-cert.pub"
+ # Remove all existing host keys.
+ for filename in glob.glob(f"{mp}/etc/ssh/ssh_host_*_key*"):
+ os.remove(filename)
+
# Note that the order of HostKey and HostCertificate lines matter.
write(
f"{mp}{config_d}/id.conf",
f"""
-HostKeyAlgorithms ssh-ed25519
+HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com
HostKey {host_key}
HostCertificate {host_cert}
""",