A error: Unable to authenticate
The client has disconnected from the server. Reason:Unable to authenticate using any of the configured authentication methods.
Meaning 无法进行身份验证
, the error message is vague, can not be determined immediately, the investigation may be the following reasons:
SSH client does not open password authentication
Or SSH server does not allow password authentication
It is also possible that SSH Keys errors (lost / damaged / mismatched)
Terminal SSH connection change
Did it because I had been using SecureCRT normal connection, only recently began to report this error, it is likely to be a local connection data SecureCRT is a problem, but you can rule out switching to Terminal connection problem.
# Connection SSH $ 22 -p SSH root @ IP
If you login login input appears, then determine SecureCRT problem, this time by simply deleting SecureCRT in the re-establishment of a connection can be resolved. If there is no problem login continue to look down.
Confirm SSH configuration
Examination /etc/ssh/sshd_config
of the PasswordAuthentication yes
removed comments, save, restart the ssh service sshd restart
service: .
Try connecting again, if the error disappear, resolved, otherwise continue below.
Because access is denied
Log Server Viewauth.log
cat auth.log 15 11:20:24 hp06 sshd[31533]: Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys
Solution: chmod 600 /home/user/.ssh/authorized_keys
Here come according to your log.
SSH certificate does not match
This is generally not the reason, but if the above methods are useless, you need the pem
certificate into pub
the certificate, and manually specify the path to solve the problem.
Error two: Protocol version mismatch
The client has disconnected from the server. Reason: Protocol version mismatch. Required protocol version is 1.3 - 1.99. Received version was 2.0.
Tip is clear is 连接协议版本不匹配
, the solution modified to SSH2 on the line: