Created
February 23, 2024 08:27
-
-
Save Ewen2015/4802d087f755609136efa9fe832b5c9a to your computer and use it in GitHub Desktop.
Generating a new SSH key and adding it to the ssh-agent
This file contains 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
function generate_ssh_key () { | |
read -p "Enter github email : " email | |
echo "Using email $email" | |
ssh-keygen -t ed25519 -C "$email" | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 | |
pub=`cat ~/.ssh/id_ed25519.pub` | |
echo "$pub" | |
} | |
generate_ssh_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment