![Metasploit Penetration Testing Cookbook(Third Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/212/36700212/b_36700212.jpg)
上QQ阅读APP看书,第一时间看更新
How to do it...
- To connect to the Kali Linux virtual machine, you need to know its IP address. To find the IP address, log in to the virtual machine, open a Terminal window, and enter the ip address command, or ip a for short:
root@kali:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:b6:03:93 brd ff:ff:ff:ff:ff:ff
inet 192.168.216.5/24 brd 192.168.216255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feb6:393/64 scope link
valid_lft forever preferred_lft forever
Note down the IP address of the second interface, in this example 192.168.216.5.
- Now, use the SSH client on the host operating system. Enter the username root followed by the @ symbol and the IP address of the Kali Linux virtual machine, 192.168.216.5:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/86cfe890-53e2-4fa5-b76d-d3c555b6b5e5.png?sign=1738842487-YduIG2nfKMAYuBvqw0dajG7Snp5ZUMxb-0-9010a127c71baed1a63f9c61de34cee9)
In this SSH session, we can now interact with the Kali Linux virtual machine using the SSH client.
You will need to verify the SSH certificate after you launch the connection.