sudo passwd
输出
Changing password for user root.
New password:
Retype new password:
允许使用root登录
vim /etc/ssh/sshd_config
#没有vim用vi或者安装
yum install -y vim
修改:
PermitRootLogin yes
PasswordAuthentication yes
重启
service sshd start
service sshd restart
开机自启
systemctl enable sshd