Blog

Projects

Stacks

Snippets

About

SSH Key Management

Generate SSH Key Pair#

Generate default RSA key

ssh-keygen

Generate Ed25519 key (more secure)

ssh-keygen -t ed25519

View SSH Keys#

Windows command line

notepad %USERPROFILE%\.ssh\id_rsa.pub

Linux/WSL

cat ~/.ssh/id_rsa.pub

Set SSH Directory Permissions#

Set directory permissions

chmod 700 ~/.ssh

Set key file permissions

chmod 600 ~/.ssh/authorized_keys

These commands help you manage SSH keys securely:

  • The Ed25519 key type is recommended for new deployments as it provides better security
  • Directory permissions (700) ensure only you can access the .ssh directory
  • File permissions (600) protect your key files from unauthorized access