Xshell连接kali linux

目录:

1.Xshell连接kali

 

 

先说明一个小白错误:必须要有ssh服务,才能Xhell进行连接。

  •  即  必须要打开kali系统,启动ssh服务,Xshell才可以通过ssh连接上kali。

1.Xshell连接kali

步骤一:进入kali系统,查看ssh服务状态,如果未开启服务,则启动ssh服务。设置开机自启ssh服务。查看kali的IP。

查看ssh服务状态命令:

/etc/init.d/ssh status

打印的日志信息:

● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: disabled)
     Active: inactive (dead)  //表示未开启ssh服务。
       Docs: man:sshd(8)
             man:sshd_config(5)

启动ssh服务命令:

/etc/init.d/ssh start

再次查看ssh服务状态:

/etc/init.d/ssh status

打印的日志信息:

● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: disabled)
     Active: active (running) since Mon 2021-09-13 11:09:48 CST; 13min ago //ssh服务启动。
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 1293 (sshd)
      Tasks: 1 (limit: 2275)
     Memory: 2.9M
     CGroup: /system.slice/ssh.service
             └─1293 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

设置开机自启ssh服务:

update-rc.d ssh enable

查看kali的IP:

ifconfig

打印的日志信息:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.231.130  netmask 255.255.255.0  broadcast 192.168.231.255
        inet6 fe80::20c:29ff:fee2:2be6  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:e2:2b:e6  txqueuelen 1000  (Ethernet)
        RX packets 1018  bytes 85036 (83.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 287  bytes 35654 (34.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 16  bytes 712 (712.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 712 (712.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

步骤二:进入Xshell,新建会话,填写名称和 所要连接的主机IP。

Xshell连接kali linux

 

 点击连接按钮。

如果是第一次进行ssh连接,会弹出以下窗口(该图不是我的,但是可以进行说明):

Xshell连接kali linux

 

 点击接受并保存按钮。

会弹出以下窗口:

Xshell连接kali linux

 

 用户名写kali系统的用户名。

点击确定按钮。

会弹出以下窗口:

Xshell连接kali linux

 

 密码写kali系统的登录密码。

点击确定按钮。

步骤三:Xshell连接kali。

在所有会话菜单栏上双击kali,即可连接。

Xshell连接kali linux

  打印的日志信息:

[C:\~]$ 

Connecting to 192.168.231.130:22...
Connection established.  //连接建立
To escape to local shell, press 'Ctrl+Alt+]'.

Linux kali 5.9.0-kali1-amd64 #1 SMP Debian 5.9.1-1kali2 (2020-10-29) 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.
Last login: Mon Sep 13 11:46:19 2021 from 192.168.231.1
┏━(Message from Kali developers)
┃
┃ We have kept /usr/bin/python pointing to Python 2 for backwards
┃ compatibility. Learn how to change this and avoid this message:
┃ ? https://www.kali.org/docs/general-use/python3-transition/
┃
┗━(Run “touch ~/.hushlogin” to hide this message)
┌──(kali?kali)-[~]
└─$ 

 退出连接的快捷键:

ctrl+d

 

 





上一篇:第09讲:Flink 状态与容错


下一篇:xshell连接centons