1、切換角色為root
sudo -i
2、修改root默認(rèn)密碼
passwd
3、修改SSH配置文件/etc/ssh/sshd_config
vi /etc/ssh/sshd_config
修改以下兩行:
PermitRootLogin yes //默認(rèn)為no,需要開啟root用戶訪問改為yes
PasswordAuthentication yes //默認(rèn)為no,改為yes開啟密碼登陸
4、重啟服務(wù)
systemctl restart sshd