xshell之类的软件第一次连接不上初次安装kali问题(转)

用虚拟机配置着玩xshell连接kali
结果遇到的问题记录:
xshell连接不上,与centos 不同需要手动打开服务
方法:
1、修改sshd_config文件,命令为:vi /etc/ssh/sshd_config 


2、将#PasswordAuthentication no的注释去掉,并且将NO修改为YES  


3、将#PermitRootLogin yes的注释去掉 


4、启动SSH服务,命令为:/etc/init.d/ssh start // 或者service ssh start


5、结果并不能用root账户登录,
#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key


#ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key


生成两个密匙


6、service ssh restart 

 

但是并没有解决问题

 

我又尝试了另一种方法

将 # Authentication:

LoginGraceTime 120

PermitRootLogin prohibit-password

StrictModes yes

改为:

# Authentication:

LoginGraceTime 120

PermitRootLogin yes

StrictModes yes

 

最后:service ssh restart 

成功连接

posted @ 2018-06-08 00:53  冬季的袜子  阅读(777)  评论(0编辑  收藏  举报