More install scripts

This commit is contained in:
2026-03-14 19:40:46 +00:00
parent 2de91ed77b
commit 10939f2ea3
3 changed files with 31 additions and 8 deletions

View File

@@ -5,9 +5,9 @@ echo "Server Setup Script"
echo "-------------------------------------"
echo "Extracting login details from enpass"
SERVER=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif space" 'select(.label=="New new admin password")')
SERVERUN=$(echo "$LABS" | jq -r '.[].login')
SERVERPW=$(echo "$LABS" | jq -r '.[].password')
SERVER=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif space" | jq '.[] | select(.label=="New new admin password")')
SERVERUN=$(echo "$SERVER" | jq -r '.login')
SERVERPW=$(echo "$SERVER" | jq -r '.password')
SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file
SERVERIP="scarif.space"
@@ -21,7 +21,7 @@ KEY=$(cat "$SSHPATH.pub")
echo "~~~~~~~~"
echo "Copying SSH key to server known hosts"
ssh-keyscan -p $SERVERPORT $SERVERIP >> ~/.ssh/known_hosts
ssh-keygen -F $SERVERIP >/dev/null || ssh-keyscan -p $SERVERPORT $SERVERIP >> ~/.ssh/known_hosts
echo "~~~~~~~~"
echo "Checking if key exists on the server"