修改SSH默认配置文件
sudo su
进入root账户,然后设置root密码
passwd root
修改SSH配置文件
vim /etc/ssh/sshd_config
找到下面两个属性修改为yes
#默认为no,需要开启root用户访问为yes
PermitRootLogin=yes
#默认为no,需要开启密码登陆为yes
PasswordAuthentication=yes
重启sshd
systemctl restart sshd.service
sudo su
passwd root
vim /etc/ssh/sshd_config
#默认为no,需要开启root用户访问为yes
PermitRootLogin=yes
#默认为no,需要开启密码登陆为yes
PasswordAuthentication=yes
systemctl restart sshd.service