possible reason:
-
The ssh service on Linux does not have a password to log in
Two solutions have been found so far:
-
Open password login
Executesudo vim /etc/ssh/sshd_config
, findPasswordAuthentication
an item,no
change it toyes
-
Add secret-free login
In~/.ssh/
the directory, editauthorized_keys
the file and add the contents of the local public key file. (I am locallyid_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