Parcourir la source

Show ssh keys on about

Bob Mottram il y a 6 ans
Parent
révision
e0298d0cab
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8
    0
      src/freedombone-controlpanel

+ 8
- 0
src/freedombone-controlpanel Voir le fichier

@@ -232,6 +232,14 @@ function show_domains {
232 232
         W+=("IPv6" "${ipv6_address}")
233 233
     fi
234 234
 
235
+    if [ -f /etc/ssh/ssh_host_rsa_key.pub ]; then
236
+        #W+=("SSH RSA Md5" "$(ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub | awk -F ' ' '{print $2}')")
237
+        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')")
238
+    fi
239
+    if [ -f /etc/ssh/ssh_host_ed25519_key.pub ]; then
240
+        #W+=("SSH ED25519 Md5" "$(ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub | awk -F ' ' '{print $2}')")
241
+        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')")
242
+    fi
235 243
 
236 244
     if grep -q "ssh onion domain" "$COMPLETION_FILE"; then
237 245
         domain_onion=$(grep 'ssh onion domain' "${COMPLETION_FILE}" | awk -F ':' '{print $2}')