Today, I launched a new AWS instance with Ubuntu 22.04. The default key provided by AWS is working fine with SSH. But when I attached my personal ssh key to the server and tried to access with FileZilla over SFTP, I got the following error in auth.log.
May 10 11:52:59 localhost sshd: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
May 10 11:53:00 localhost sshd: message repeated 3 times: [ userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]]
May 10 11:53:00 localhost sshd: error: Received disconnect from 126.96.36.199 port 50045:14: No supported authentication methods available [preauth]
First, I make confirm that key-based authentication is working as I was able to log in with the ssh key provided by the AWS console. After that, I created a new key with type ecdsa.
Open a terminal and generate a new key-pair:
ssh-keygen -t ecdsa
Once the key is generated, add the public key to remote servers ~/.ssh/authorized_key file.
Now, I can successfully connect to the remote server with FileZilla over SFTP.