As of today, RSA is the most widely used, but Ed25519 has become the newly recommended public key algorithm to use. Ed25519 it uses Twisted Edwards curve.
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -C "[email protected]"
-t
specify the type we're using, in our case ed25519.-f
specify the filename of the generated key file.-C
(Optional) specify the comment inside the key, it is usually filled with <user>@<hostname>
.Additionally, you can add -a NUMBER
flag to customize the key derivation function rounds to slow down the passphrase verification, which can slow down any brute force attempt (and also slow you down).
With the minor benefit above, you should consider making a new key using Ed25519. However, it doesn't mean you need to switch immediately, you could just add the new key without having to remove your old key type.
References