Skip to content

Commit ecde200

Browse files
authored
Merge pull request #86 from BenjaminEHowe/master
Display SSH host public keys
2 parents f810a77 + 3617142 commit ecde200

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ app_setup_block: |
7676
The keys generated by this script are only displayed on your console output, so make sure to save them somewhere after generation.
7777
# changelog
7878
changelogs:
79+
- {date: "04.05.24:", desc: "Display the SSH host public keys every time the container starts."}
7980
- {date: "09.03.24:", desc: "Rebase to Alpine 3.19."}
8081
- {date: "12.06.23:", desc: "Rebase to Alpine 3.18, deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
8182
- {date: "05.03.23:", desc: "Rebase to Alpine 3.17."}

root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ if [[ ! -L /etc/ssh ]]; then
4141
ssh-keygen -A
4242
fi
4343

44+
# display SSH host public key(s)
45+
echo "SSH host public key(s):"
46+
cat /config/ssh_host_keys/ssh_host_*.pub
47+
4448
# custom port
4549
if [[ -n "${LISTEN_PORT}" ]]; then
4650
sed -i "s/^#Port [[:digit:]]\+/Port ${LISTEN_PORT}"/ /etc/ssh/sshd_config

0 commit comments

Comments
 (0)