Add ssh setup script
Some checks failed
Lint / Lint (3.10) (push) Failing after 13s
Lint / Lint (3.11) (push) Failing after 16s

This commit is contained in:
Ariejan de Vroom 2024-06-07 12:31:29 +02:00
parent ef3fde6d7f
commit bf26066aaf
Signed by: ariejan
GPG Key ID: AD739154F713697B
2 changed files with 17 additions and 0 deletions

View File

@ -26,6 +26,7 @@ packages:
- git
- gnupg
- htop
- inetutils
- iotop
- linux-firmware
- lm_sensors

16
scripts/setup_ssh_key.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env -S bash -i
if [ -f "${HOME}/.ssh/id_ed25519" ]; then
echo "SSH private key already exists. Exiting."
exit 1
fi
HOSTNAME=`hostname`
ssh-keygen -t ed25519 -C "$USER@$HOSTNAME"
ssh-keyscan -H git.devroom.io >> "${HOME}/.ssh/known_hosts"
ssh-keyscan -H github.com >> "${HOME}/.ssh/known_hosts"
echo "--- Your public key, sir:"
cat "${HOME}/.ssh/id_ed25519.pub"