Skip to content
  • 1.设置root用户密码
shell
sudo passwd root
  • 2.修改sshd_config文件
shell
sudo vim /etc/ssh/sshd_config

修改下面配置

text
#PermitRootLogin prohibit-password
#PasswordAuthentication yes

text
PermitRootLogin yes
PasswordAuthentication yes
  • 3.重启ssh服务
shell
sudo service sshd restart