This is a small script to generate SSH keys following GitHub's docs.
For convenience, this script is also available as a Github gist.
chmod +x generate-ssh.sh
./generate-ssh.shThe script will prompt for your email and generate an Ed25519 SSH key at ~/.ssh/id_ed25519.
Note: The script will exit if a key already exists at that location to prevent accidental overwrites.
After generation, copy your public key to add it to GitHub, GitLab, or other platforms:
pbcopy < ~/.ssh/id_ed25519.pub