KaliLinux的SSH服务默认是需要手动配置好后才能使用,否则通过xShell等工具是无法连接上的。
修改SSH服务的配置文件
root@kali:~# cd /etc/ssh root@kali:/etc/ssh# root@kali:/etc/ssh# vim sshd_config ~ #PasswordAuthentication yes #修改为: PasswordAuthentication yes ~ PermitRootLogin prohibit-password #修改为: PermitRootLogin yes ~ :wq
注:因为kali中permitrootlogin默认是没有密码的,但是kali不允许没有密码来使用sshd,所以修改sshd_config中的PermitRootLogin without-password修改成PermitRootLogin yes,然后保存退出并重启服务来实现xshell的使用
KaliLinux中的SSH服务,默认每次开机后都需要手动启动。为了方便远程SSH连接,需要修改为开机自启动。
添加开机自启动SSH服务
root@kali:/etc/ssh# update-rc.d ssh enable
root@kali:/etc/ssh#
注:若需要关闭自启动SSH服务,则:
root@kali:/etc/ssh# update-rc.d ssh disabled
root@kali:/etc/ssh#
启动SSH服务
root@kali:/etc/ssh# service ssh start
root@kali:/etc/ssh#