#! /bin/bash echo "-------------------------------------" echo "SSH Setup Script" echo "-------------------------------------" echo "Extracting login details from enpass" LABS=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif: Labs") LABSUN=$(echo "$LABS" | jq -r '.[].login') LABSPW=$(echo "$LABS" | jq -r '.[].password') SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file TITLE="$USER@$(cat /etc/hostname)" # The title for the SSH key echo "~~~~~~~~" echo "Generating the SSH key if it does not exist" [ ! -f $SSHPATH ] && ssh-keygen -t ed25519 -f "$SSHPATH" -N "" -q KEY=$(cat "$SSHPATH.pub") # A method to generate the parameters for creating an SSH key on gitea generate_post_data() { cat <