From e0298d0cab010db9b550c186950b658def470f15 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 24 Apr 2018 17:49:31 +0100 Subject: [PATCH] Show ssh keys on about --- src/freedombone-controlpanel | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 67880c05..7bf38014 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -232,6 +232,14 @@ function show_domains { W+=("IPv6" "${ipv6_address}") fi + if [ -f /etc/ssh/ssh_host_rsa_key.pub ]; then + #W+=("SSH RSA Md5" "$(ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub | awk -F ' ' '{print $2}')") + W+=("SSH RSA SHA256" "$(awk '{print $2}' /etc/ssh/ssh_host_rsa_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64 | sed 's|=||g')") + fi + if [ -f /etc/ssh/ssh_host_ed25519_key.pub ]; then + #W+=("SSH ED25519 Md5" "$(ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub | awk -F ' ' '{print $2}')") + W+=("SSH ED25519 SHA256" "$(awk '{print $2}' /etc/ssh/ssh_host_ed25519_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64 | sed 's|=||g')") + fi if grep -q "ssh onion domain" "$COMPLETION_FILE"; then domain_onion=$(grep 'ssh onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}')