Created
January 28, 2026 09:50
-
-
Save virtualstaticvoid/e34769ca1f4cf3ff6484c7092735dc51 to your computer and use it in GitHub Desktop.
Make SSH key with email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| email=$1 | |
| usage() { | |
| echo "Usage: $0 <email>" | |
| } | |
| if [ -z "${email}" ]; then | |
| echo "Error: Email address is required." | |
| usage | |
| exit 1 | |
| fi | |
| ssh-keygen -t rsa -b 4096 -C $email -f id_rsa -N '' | |
| echo -e "\nGenerated SSH key" | |
| cat id_rsa.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment