Skip to content

Commit

Permalink
safebelt check
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Mar 21, 2023
1 parent d473795 commit 82ddbd1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ execute_hooks() {
print_fingerprints() {
local BASE_DIR=${1-'/etc/ssh'}
for item in dsa rsa ecdsa ed25519;do
echo ">>> Fingerprints for ${item} host key"
ssh-keygen -E md5 -lf ${BASE_DIR}/ssh_host_${item}_key
ssh-keygen -E sha256 -lf ${BASE_DIR}/ssh_host_${item}_key
ssh-keygen -E sha512 -lf ${BASE_DIR}/ssh_host_${item}_key
if [ -e ${BASE_DIR}/ssh_host_${item}_key ];then
echo ">>> Fingerprints for ${item} host key"
ssh-keygen -E md5 -lf ${BASE_DIR}/ssh_host_${item}_key
ssh-keygen -E sha256 -lf ${BASE_DIR}/ssh_host_${item}_key
ssh-keygen -E sha512 -lf ${BASE_DIR}/ssh_host_${item}_key
fi
done
}

Expand Down

0 comments on commit 82ddbd1

Please sign in to comment.