Skip to content

Commit 4ee4c06

Browse files
GiteaBotManInDark
andauthored
also check default ssh-cert location for host (#34099) (#34100) (#34116)
Backport #34100 by @ManInDark Fixes #34099. Resolved by checking the `key-cert.pub` location alongside the previously configured location. In case a certificate is already found, this won't change anything, but if there is one in `key-cert.pub` but not in `key_cert`, it'll use that one now. Co-authored-by: ManInDark <[email protected]>
1 parent 3063e37 commit 4ee4c06

File tree

1 file changed

+12
-0
lines changed
  • docker/root/etc/s6/openssh

1 file changed

+12
-0
lines changed

docker/root/etc/s6/openssh/setup

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ if [ -e /data/ssh/ssh_host_ecdsa_cert ]; then
3131
SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_cert"}
3232
fi
3333

34+
if [ -e /data/ssh/ssh_host_ed25519-cert.pub ]; then
35+
SSH_ED25519_CERT=${SSH_ED25519_CERT:-"/data/ssh/ssh_host_ed25519-cert.pub"}
36+
fi
37+
38+
if [ -e /data/ssh/ssh_host_rsa-cert.pub ]; then
39+
SSH_RSA_CERT=${SSH_RSA_CERT:-"/data/ssh/ssh_host_rsa-cert.pub"}
40+
fi
41+
42+
if [ -e /data/ssh/ssh_host_ecdsa-cert.pub ]; then
43+
SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa-cert.pub"}
44+
fi
45+
3446
if [ -d /etc/ssh ]; then
3547
SSH_PORT=${SSH_PORT:-"22"} \
3648
SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \

0 commit comments

Comments
 (0)