xshell无法连接虚拟机中的Kali系统
Connecting to 192.168.124.21:22...
Could not connect to '192.168.124.21' (port 22): Connection failed.
修改/etc/ssh/sshd_config配置文件
-
找到#PasswordAuthentication yes 把#的注释去掉
-
将PermitRootLogin without-password修改为:
PermitRootLogin yes
kali:~# vim /etc/ssh/sshd_config
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
...skipping...
PasswordAuthentication yes ### 把#的注释去掉
#PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
。。。。。。
。。。。。。
#LoginGraceTime 2m
PermitRootLogin yes ###将PermitRootLogin prohibit-password修改为:PermitRootLogin yes
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
- 重启ssh服务
# /etc/init.d/ssh restart
- 设置开机自动启动
# update-rc.d ssh enable
网友评论