ed25519

You can generate a strong Ed25519 key using the ssh-keygen utility on Linux Unix or macOS:

  1. Open a terminal or command prompt on your computer.
  2. Type the following command to generate a new Ed25519 key pair:
  3. ssh-keygen -t ed25519 -o -a 100
  4. This will generate a new Ed25519 key pair with a high number of KDF (key derivation function) rounds to increase security. The -o option enables the new private key file format, which uses a stronger encryption algorithm than the older PEM format.
  5. You will be prompted to choose a filename and location to save the new key pair. You can choose a location and filename that make sense for your needs, or accept the default (~/.ssh/id_ed25519).
  6. You will also be prompted to enter a passphrase to protect the private key. While this is not strictly necessary, it can provide an extra layer of security in case the key file is ever compromised.
  7. After you have generated the key pair, you can copy the public key to the remote servers you want to authenticate with by using the ssh-copy-id command. For example:
  8. ssh-copy-id -i ~/.ssh/id_ed25519.pub user@remote-host
  9. This will copy the public key to the authorized_keys file on the remote server, allowing you to authenticate using the private key.