In questo articolo vediamo come generare e condividere chiavi SSH in modo sicuro ed efficiente, analizzando le differenze tra RSA a 4096 bit e Ed25519.
Per creare chiavi robuste:
# RSA a 4096 bit
ssh-keygen -t rsa -b 4096 -C "tuo.email@example.com"
# Ed25519 (256 bit)
ssh-keygen -t ed25519 -C "tuo.email@example.com"
Copiare la chiave pubblica sul server remoto:
ssh-copy-id -i ~/.ssh/id_ed25519.pub utente@host_remoto
Oppure manualmente:
cat ~/.ssh/id_ed25519.pub | ssh utente@host_remoto "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Le chiavi SSH ben configurate garantiscono comunicazioni cifrate e semplificano l’accesso remoto. RSA rimane utile per ambienti legacy, mentre Ed25519 è consigliato per deployment moderni.