kali linux在安装好之后,是不开启任何端口对外提供访问的。
现在想通过ssh方式连接kali linux,需要开启ssh服务
一、配置SSH参数修改sshd_config文件,命令为:
sudo vi /etc/ssh/sshd_config
1、将#PasswordAuthentication no的#注释去掉,并且将NO修改为YES //kali中默认是yes
2、添加PermitRootLogin yes,如下图1-1
$ cat /etc/ssh/sshd_config|grep -v ^#|grep -v ^$ Include /etc/ssh/sshd_config.d/*.conf PermitRootLogin yes PasswordAuthentication yes KbdInteractiveAuthentication no UsePAM yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server二、启动SSH服务
sudo service ssh start
三、测试可以正常登录



