Kali opens the ssh service and boots up automatically

foreword

The tutorials on the Internet are not uniform. I didn’t pay attention to it before. I didn’t find out that some online teaching methods are wrong until today, so record the correct method.

1. Modify the configuration file

(1) Modify ssh_config

vim /etc/ssh/ssh_config

Remove the # in front of PubkeyAuthentication yes

insert image description here

(2) Modify sshd_config

vim /etc/ssh/sshd_config

Remove the # in front of #PermitRootLogin prohibit-password
and change the following prohibit-password to yes
Remove the # in front of PubkeyAuthentication yes
insert image description here

Restart the ssh service

service ssh restart

The ssh service starts automatically at boot

systemctl restart ssh

Guess you like

Origin blog.csdn.net/weixin_57048716/article/details/129325861