xshell無法連接虛擬機中的Kali系統(tǒng)
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服務(wù)
# /etc/init.d/ssh restart
- 設(shè)置開機自動啟動
# update-rc.d ssh enable