1001Ferramentas
🔑 Generators

SSH Keypair Generator (Ed25519)

Generate Ed25519 SSH keypairs client-side ready to use in ~/.ssh/, with SHA256 fingerprint and OpenSSH format.

Esta chave não é criptografada — use só em ambiente local de teste.

SSH keypairs from scratch

SSH (Secure Shell) was designed by Tatu Ylönen at Helsinki University of Technology in 1995 after a password sniffing attack on the campus network. It replaced the cleartext telnet / rlogin / rsh family overnight and is now the standard for remote shells, file transfer (SFTP, SCP), port forwarding, git over SSH and tunnelling. The version everyone runs today is OpenSSH, the OpenBSD fork led by Theo de Raadt since 1999 — shipped with every Linux distribution, macOS, and Windows 10+.

A keypair is two files: a private key that stays on your laptop and a public key you copy to every server you want to log into (appended to ~/.ssh/authorized_keys). The server challenges the client to prove possession of the private key without ever seeing it. The math underneath comes in four flavours:

  • RSA — the historic default. Use 4096 bits minimum since 2014; 2048 is borderline, 1024 is broken. Still ubiquitous because every legacy server accepts it.
  • Ed25519 — designed by Daniel J. Bernstein in 2011, supported in OpenSSH 6.5 (2014). Fixed 32-byte keys, very fast signing, no parameter pitfalls. Recommended modern default.
  • ECDSA — NIST P-256/P-384/P-521 curves. Older than Ed25519, harder to implement safely (RNG failure leaks the private key, as the PlayStation 3 found out in 2010). Avoid for new keys.
  • DSAdeprecated; refused by OpenSSH 7.0+ (2015). Do not generate.

Generate locally — the only correct way

Run ssh-keygen on your own machine. It is installed by default everywhere OpenSSH is:

ssh-keygen -t ed25519 -C "[email protected]"          # modern default
ssh-keygen -t rsa -b 4096 -C "[email protected]"       # legacy-compatible
ssh-keygen -t ed25519-sk -C "yubikey"                # FIDO2 hardware-backed

Files land in ~/.ssh/id_ed25519 (private) and ~/.ssh/id_ed25519.pub (public). Required permissions: chmod 600 on the private key, chmod 644 on the public key, chmod 700 on ~/.ssh; OpenSSH refuses to use a private key with looser perms. Copy the public key to a server with ssh-copy-id user@host.

Passphrases, agents and hardware

A passphrase encrypts the private key on disk so a stolen laptop is not a free root. It is optional but recommended — pair it with ssh-agent (or gpg-agent, macOS Keychain, KeePassXC) which caches the decrypted key in memory for the session so you type it once a day. For the highest assurance, generate the key on a YubiKey or similar FIDO2 token using ed25519-sk: the private key never leaves the chip and physical touch is required for every signature. Organisations with many machines often layer SSH certificates on top — short-lived signed credentials issued by a CA (HashiCorp Vault, Teleport, BastionZero, Smallstep) instead of long-lived authorized_keys.

Strong warning about this page

Never generate a real SSH keypair on a third-party website. The whole point of a private key is that nobody else has it; if a server saw it on the wire (even over HTTPS, even with promises that it "runs in your browser") you have to assume it is compromised — log forwarders, browser extensions, malicious advertisers, even a memory snapshot can leak it. This tool is for format demonstration only: see what an OpenSSH armored private block and a public key line look like. For production keys, run ssh-keygen on your own machine, offline if you can.

FAQ

Should I generate keys locally? Always. ssh-keygen takes one command and no key material ever leaves your disk.

Is a passphrase mandatory? Not technically — OpenSSH accepts empty passphrases — but strongly recommended for any key that touches a server you care about. Use ssh-agent so it is not annoying.

Ed25519 or RSA 4096? Ed25519 unless you must support an ancient server that only speaks RSA. Smaller, faster, fewer footguns. GitHub, GitLab, Bitbucket and AWS EC2 all accept Ed25519 since 2021.

What is known_hosts? A trust-on-first-use cache of server fingerprints at ~/.ssh/known_hosts. The scary "Host key verification failed" warning means the server's fingerprint changed — either legitimate rotation or a man-in-the-middle.

Is the key generated here safe to use on a server? No. Use this output only to see the format. Generate the real one with ssh-keygen on your laptop.

Related Tools