ssh-keygen Command: Create SSH Keys with Examples

Practical ssh-keygen examples for creating Ed25519 and RSA SSH keys, choosing a file name, adding a passphrase, checking fingerprints, and testing GitHub or server access.

  • ssh-keygen is the OpenSSH command-line utility for creating and managing SSH key pairs.
  • The recommended modern command is ssh-keygen -t ed25519 -C "you@example.com".
  • Use ssh-keygen -t rsa -b 4096 only for older systems that do not support Ed25519.
Platform Setup Guides
What Is SSH? The Complete Guide to Secure Shell What Is an SSH Key? Public and Private Keys Explained SSH Command Examples: Syntax, Flags, Tunnels, and Keys How to Set Up SSH Keys for GitHub, Linux, Mac, and Windows Generate SSH Key: Online Tool and ssh-keygen Commands ssh-keygen Command: Create SSH Keys with Examples
SSH Key Generator
English 简体中文 繁體中文 日本語 한국어 Español Português Français Deutsch Русский Italiano Nederlands Polski Svenska עברית Dansk Norsk हिन्दी Tiếng Việt Türkçe Indonesia Suomi Українська العربية ไทย Română Čeština বাংলা Ελληνικά Magyar
Resources
GitHub SSH Docs GitLab SSH Docs SSH Academy SSH Cheat Sheet
ssh-keygen Command: Create SSH Keys with Examples SSH Key Generator: Generate SSH Keys Online