From 7fe11912831db959fc17290ee7a65f7eb3bfa325 Mon Sep 17 00:00:00 2001 From: servostar Date: Sun, 24 Nov 2024 14:39:31 +0100 Subject: [PATCH] ssh: add github ssh key config and setup script --- .gitignore | 6 ++++++ .ssh/config | 4 ++++ run-setup-ssh.sh | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 .ssh/config create mode 100755 run-setup-ssh.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3207a6d --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Ignore SSH known hosts +known_hosts +known_hosts.old +# Ignore SSH keys since they are stored and managed by +# the Yubikey. +id_ed25519_sk_rk_* diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..b44a3d2 --- /dev/null +++ b/.ssh/config @@ -0,0 +1,4 @@ +Host github.com + HostName github.com + User git + IdentityFile ~/.ssh/id_ed25519_sk_rk_servostar@github.com diff --git a/run-setup-ssh.sh b/run-setup-ssh.sh new file mode 100755 index 0000000..4f7d282 --- /dev/null +++ b/run-setup-ssh.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Retrieve key from Yubikey +echo "==> Getting keys from Yubikey..." +cd .ssh +ssh-keygen -K +