Kali连接不上ssh

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 //设置关闭

 

原文地址:https://www.cnblogs.com/guanghe/p/10117835.html