Enable SSH password login in Linux

Enable SSH password login in Linux

1. Change the configuration file

First open /etc/ssh/sshd_configthe file with administrator privileges.

sudo vi /etc/ssh/sshd_config

Find PasswordAuthenticationthe 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:

insert image description here
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.1It needs to be changed to the external network address of your server.

Guess you like

Origin blog.csdn.net/qq_41974199/article/details/128792455