linux ssh login Permission denied (publickey)

possible reason:

  1. The ssh service on Linux does not have a password to log in

    Two solutions have been found so far:

    • Open password login
      Execute sudo vim /etc/ssh/sshd_config, find PasswordAuthenticationan item, nochange it toyes

    • Add secret-free login
      In ~/.ssh/the directory, edit authorized_keysthe file and add the contents of the local public key file. (I am locally id_rsa.pub)


Also, force ssh to provide rsa key:

ssh -o HostKeyAlgorithms=ssh-rsa [email protected]

See: https://qastack.cn/ubuntu/133172/how-can-i-force-ssh-to-give-an-rsa-key-instead-of-ecdsa

Guess you like

Origin blog.csdn.net/Crazy_zh/article/details/118441084