--- orig/elho-install-sshkey
+++ mod/elho-install-sshkey
@@ -26,6 +26,13 @@
 
 . /lib/elho/shell-tools
 
+keygen_fingerprint ()
+{
+    local keygen_output="$1"
+    
+    printf '%s' "${keygen_output}" | sed --expression='s/^[^[:space:]]\+[[:space:]]\([^[:space:]]\+\)[[:space:]].*$/\1/'
+}
+
 IDENTITY__FILE_PATH='/usr/share/elho/ssh'
 USER_IDENTITY_FILE="${IDENTITY__FILE_PATH}/elho/id_ed25519.pub"
 ROOT_IDENTITY_FILE="${IDENTITY__FILE_PATH}/root/id_ed25519.pub"
@@ -63,18 +70,23 @@
     exit 1
 fi
 
-output="$(ssh-keygen -l -f "${IDENTITY_FILE}")"
-fingerprint="$(printf '%s' "${output}" | sed --expression='s/^[^[:space:]]\+[[:space:]]\([^[:space:]]\+\)[[:space:]].*$/\1/')"
+output_md5="$(ssh-keygen -l -E md5 -f "${IDENTITY_FILE}")"
+output_sha256="$(ssh-keygen -l -E sha256 -f "${IDENTITY_FILE}")"
+fingerprint_md5="$(keygen_fingerprint "${output_md5}")"
+fingerprint_sha256="$(keygen_fingerprint "${output_sha256}")"
 
-if [ -z "${fingerprint}" ]; then
+if [ -z "${fingerprint_md5}" -o -z "${fingerprint_sha256}" ]; then
     error "Unable to parse fingerprint of source identity file '${IDENTITY_FILE}'!"
     exit 1
 fi
 
-printf "Do you really want to install '%s', granting\naccess to your account to the SSH key with the following fingerprint:\n\n%s\n\nEnter uppercase yes or the fingerprint to grant access: " "${AUTORIZED_KEYS_FILE}" "${output}"
+printf "Do you really want to install '%s', granting\naccess to your account to the SSH key with the following fingerprint:\n\n%s\n%s\n\nEnter uppercase yes or the fingerprint to grant access: " "${AUTORIZED_KEYS_FILE}" "${output_md5}" "${output_sha256}"
 
 read answer
-if [ "${answer}" = 'YES' -o "${answer}" = "${fingerprint}" ]; then
+if [ "${answer}" = 'YES' \
+	-o "${answer}" = "${fingerprint_md5}" \
+	-o "${answer}" = "${fingerprint_sha256}" ]
+then
     echo 'Installing authorized keys file...'
     cp -i "${IDENTITY_FILE}" "${AUTORIZED_KEYS_FILE}"
 else
