Windows远程连接kali linux之SSH

可以使用ssh用命令行操作kali,也可以用xrdp实现Windows远程kali Linux,先介绍一下ssh登陆吧

实验条件:kali 配置ssh登陆,使用CRT连接

首先进入kali桌面,然后打开terminal

vi /etc/ssh/sshd_config

需要该两个地方:

a.20行左右增加一句

PermitRootLogin yes

b.第67行左右增加一句(或者去掉注释#)

PasswordAuthentication yes

 

sshd_config文件内容如下

Linux kali 4.15.0-kali2-amd64 #1 SMP Debian 4.15.11-1kali1 (2018-03-21) x86_64

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@kali:~# 
root@kali:~# 
root@kali:~# 
root@kali:~# 
root@kali:~# 
root@kali:~# vim /etc/ssh/sshd_config
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
"/etc/ssh/sshd_config" 126L, 3314C                            84,38         70%

然后保存退出,然后开启ssh服务

systemctl restart ssh.service(2018.4使用这条命令)

service ssh start(老版命令)

最好是开机启动ssh,以防重启后ssh连接不上

sudo systemctl enable ssh

然后查看ip,内网IP,PC需要与kali在同一个局域网中。

ifconfig

开始使用Secure CRT快速连接  主机IP为

例如:192.168.1.100

 登陆kali

Windows远程连接kali linux之SSH_第1张图片

然后你的SSH配置正确的话会弹出

Windows远程连接kali linux之SSH_第2张图片

接受并保存就可以了

接着是输入密码

Windows远程连接kali linux之SSH_第3张图片

然后就可以愉快的操作了

Windows远程连接kali linux之SSH_第4张图片

 

你可能感兴趣的:(Kali,Linux学习之路)