Android SSH issues

Android SSH issues

Log-in rejected

Using my Android tablets I found that I could not use SFTP. The error in /var/log/auth.log said this:

java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available [preauth]

The solution was to put this line into a stub file in /etc/ssh/sshd_config.d/ (e.g., android.conf):

HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa

It is the last one, ssh-rsa, that is missing in the default configuration and allows the older Android apps to work. Restart sshd and it should work.