To generate new RSA SSH key type the following command in the Raspberry Pi terminal:
ssh-keygen -t rsa -m PEM
confirms the name of the file with ENTER and enter a passphrase (recommended).
For Ed25519 keys type:
ssh-keygen -t ed25519 -m PEM
If you don’t use any passphrase you need to edit the file /etc/ssh/sshd_config with 'PermitEmptyPasswords yes'.