1. The first is to use the command switch: ~# cd /etc/ssh View the configuration file
2. Use vim to edit the file vim ssh_config
Find two of them 1. Modify it # PasswordAuthentication no Uncomment it, and change no to yes
2.PasswordAuthentication no changed to yes
3. Then: wq
After logging out, the password may be incorrect after logging in. In this case, the configuration file sshd_config needs to be modified.
Put #Authentication:
LoginGraceTime 2m
PermitRootLogin prohibit-password
StrictModes yes
Modified to # Authentication:
LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
Then: wq save the file
4. At this point, you need to restart the ssh service
service ssh strat
or
service ssh restart (if you can log in without modifying the second configuration file sshd_config, this command is no longer required)
Then use xshell to log in remotely!