1.修改sshd_config文件

  vim /etc/ssh/sshd_config

  将#PasswordAuthentication yes的注释去掉

  将#PermitRootLogin prohibit-password的注释去掉 ,prohibit-password 改为yes

2.重启服务

  service ssh restart

3.如果还不行,执行

  #ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

4.设置ssh开机自启

  update-rc.d ssh enable //设置ssh开机自启

  update-rc.d ssh disabled //设置关闭

 

 

相关文章:

  • 2021-12-10
  • 2022-01-08
  • 2021-11-20
  • 2021-08-23
  • 2021-07-28
  • 2021-07-10
  • 2021-05-25
  • 2022-01-06
猜你喜欢
  • 2021-05-03
  • 2021-11-18
  • 2021-10-05
  • 2021-08-10
  • 2021-09-30
相关资源
相似解决方案