Skip to content

Instantly share code, notes, and snippets.

@Raiu
Raiu / add_github_key.sh
Last active October 1, 2023 16:40
This script automatically adds SSH keys from a GitHub user to the authorized_keys file on a local machine while keeping all manually added keys.
#!/usr/bin/env sh
: '
This script helps you download your ssh keys from Github while keeping any existing keys.
Usage:
./add_github_keys.sh [OPTIONS] USERNAME
Without downloading:
curl -fsSL https://gist.githubusercontent.com/Raiu/23418eac4e78856167121b4f02c13db7/raw | sh -s -- USERNAME