Add age info after creation

This commit is contained in:
ahtlon
2025-02-12 20:07:27 +01:00
parent aedf5ca0bf
commit e4be136b64
2 changed files with 7 additions and 4 deletions

View File

@@ -58,11 +58,13 @@ elif [ "$1" = "add" ]; then
echo "$pw" | keepassxc-cli attachment-import $dbpath hosts/$host/sshkey-init private "$temp/$host-init"
echo "$pw" | keepassxc-cli attachment-import $dbpath hosts/$host/sshkey-init public "$temp/$host-init.pub"
# Show entries
echo "$pw" | keepassxc-cli show -a Title --show-attachments $dbpath hosts/$host/sshkey
echo "$pw" | keepassxc-cli show -a Title --show-attachments $dbpath hosts/$host/sshkey-init
# Create mac-address
# Info
echo
echo "Hier ist der age public key für sops etc:"
echo "$(ssh-to-age -i $temp/$host.pub)"
echo
echo "Hier ist eine reproduzierbare mac-addresse:"
echo "$host"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'