Enable SSH password login in Linux
Article directory
1. Change the configuration file
First open /etc/ssh/sshd_config
the file with administrator privileges.
sudo vi /etc/ssh/sshd_config
Find PasswordAuthentication
the option and search patiently.
Of course, we can use the lookup pattern:
After opening the file first, click esc
, then enter a colon :
and a slash /
, and then enter the content we want to find. like/PasswordAuthentication
set this option to true
like:
If there is a #
sign , remember to remove the pound sign.
Next reboot to have the SSH changes take effect:
sudo service sshd restart
2. Set the login password
Please run with administrator privileges:
sudo passwd root
Enter your password and confirm your password.
3. Complete
Setup is complete! ! !
To establish a remote connection:
ssh root@192.168.0.1
192.168.0.1
It needs to be changed to the external network address of your server.