sudo -i
(切换root用户)
sudo passwd root
(修改root密码)
vim /etc/ssh/sshd_config
(编辑配置文件)
PermitRootLogin yes
(修改为YES)
PasswordAuthentication yes
(修改为YES)
cd /etc/ssh/sshd_config.d
(进入目录)
vim 60-cloudimg-settings.conf
(编辑配置文件)
PasswordAuthentication yes
(修改为YES)
sudo service ssh restart
或 sudo systemctl restart ssh
(重启SSH)
推荐意见