Generate SSH key for GitHub

Generate an ed25519 key and print the public key to copy to GitHub > Settings > SSH Keys.

Generates an Ed25519 SSH key specifically for GitHub and starts the ssh-agent. After running, add the contents of ~/.ssh/id_ed25519_github.pub to your GitHub SSH keys settings.

When you need this: When setting up a new server or machine to clone/push to GitHub repositories.

Variables

Command


        
2 views 0 copies
Log in to rate
Log in to save

Free account — save snippets into your own collections.