Why Ed25519?
Ed25519 offers compact SSH keys without a key-size setting. Use it when your client, server and cryptographic policy support it. An OpenSSH public key includes an algorithm name, an encoded key and an optional comment, so the full line length varies. See the Ed25519 and RSA comparison for compatibility considerations.
Using the generated key
Save the private key to ~/.ssh/id_ed25519 and the public key to ~/.ssh/id_ed25519.pub, then tighten permissions and load it:
chmod 600 ~/.ssh/id_ed25519 && ssh-add ~/.ssh/id_ed25519
Add the public key line to ~/.ssh/authorized_keys on servers, or paste it into GitHub/GitLab. The optional comment is embedded in both halves so you can recognize the key later.
Is generating SSH keys in a browser safe?
The key pair is created by your own browser's crypto.subtle.generateKey() using the browser’s cryptographic implementation, and the private key is displayed without ever being transmitted or stored; you can verify in the network tab that nothing leaves the page. That said, for high-value production keys the gold standard remains generating them yourself with ssh-keygen -t ed25519, so the private key never touches a rendered web page at all. Use it for test environments where you understand those limits.