Problem Description
When using a password to remotely log in to an ECS instance through Workbench or SSH (such as PuTTY, Xshell, SecureCRT, etc.), I encounter an error that the password login method is disabled on the server .:
Possible Causes:
This problem is due to the fact that the parameters in the configuration file /etc/ssh/sshd_config corresponding to the SSH service PasswordAuthentication
are set to no
, which means that password login to the ECS instance is prohibited and needs to be modified to yes
.
solution:
You can solve the above problem by binding a key pair to the instance or modifying the SSH service configuration file after logging in to the instance through VNC based on business needs.
1. Log in to the ECS instance using VNC or binding a key pair.
For specific operations, see Binding SSH Key Pair or Connection Method Overview ECS Remote Connection Operation Guide .
2. Check whether /etc/ssh/sshd_config
the parameter PasswordAuthentication
configuration is incorrect.
cat /etc/ssh/sshd_config
As shown in the figure below, PasswordAuthentication
the parameter is set to no
, indicating that password login is prohibited and needs to be modified to yes
.
3. The modified PasswordAuthentication
parameters are yes
.
- a. Open the SSH configuration file.
vi /etc/ssh/sshd_config
- b. Will be
PasswordAuthentication
no
modified toPasswordAuthentication yes
.
- c. Press the Esc key and enter
:wq
to save changes.
3. Restart the SSHD service.
service sshd restart
After restarting, you can log in with your password.