There are two ways to connect a system in a virtual machine using Xshell in a computer, one of which is when the network of a virtual machine is bridged, and this mode can connect to the extranet, that is, if the computer is able to surf the internet, it can also be connected directly to the virtual machine. In this mode only need to open the system inside the virtual machine, the firewall shut down, and then into terminal mode, enter Ifconfig carriage return, at this time can be displayed in the information to find the current system IP address
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/8E/6E/wKioL1jAFfTicvSjAAClA4HziA4478.jpg-wh_500x0-wm_ 3-wmp_4-s_4204506449.jpg "title=" qq20170308215536.jpg "alt=" Wkiol1jaffticvsjaacla4hzia4478.jpg-wh_50 "/>
(If you can't find it, check if it's connected to the network, I'm using CENTOS7, which can be viewed in the upper right corner)
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8E/70/wKiom1jAFjzBDaOUAAAWtp6WHVA461.jpg-wh_500x0-wm_ 3-wmp_4-s_1564814565.jpg "title=" qq20170308215751.jpg "alt=" Wkiom1jafjzbdaouaaawtp6whva461.jpg-wh_50 "/>
After you have noted this IP, you can minimize the virtual machine and then open the Xshell
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/6E/wKioL1jAFjyDhAyoAAAFiwoRACk434.jpg-wh_500x0-wm_ 3-wmp_4-s_2070764420.jpg "title=" qq20170308220021.jpg "alt=" Wkiol1jafjydhayoaaafiworack434.jpg-wh_50 "/>
After entering the page is probably like this,
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8E/70/wKiom1jAFj3yJ6ZZAABKKd25zMI993.jpg-wh_500x0-wm_ 3-wmp_4-s_3673667978.jpg "title=" qq20170308220102.jpg "alt=" Wkiom1jafj3yj6zzaabkkd25zmi993.jpg-wh_50 "/>
(This software can be entered in two places, can be entered directly on the black page,
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8E/6E/wKioL1jAFj3B6StoAAAGPdABl6g296.jpg-wh_500x0-wm_ 3-wmp_4-s_2729498618.jpg "title=" qq20170308220310.jpg "alt=" Wkiol1jafj3b6stoaaagpdabl6g296.jpg-wh_50 "/>
can also be entered in the input box below)
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8E/6E/wKioL1jAFj7iYZmwAAAR9W_dnTQ473.jpg-wh_500x0-wm_ 3-wmp_4-s_1708053406.jpg "title=" qq20170308220351.jpg "alt=" Wkiol1jafj7iyzmwaaar9w_dntq473.jpg-wh_50 "/>
You can connect using the Software's dialog box, or you can use the command line mode, which describes the command-line mode
Type the command such as: "ssh [email protected]" (SSH is the command of the connection; Root is the user name, either the root user or the normal user.) 172.16.7.4 is the IP address acquired by the system in the virtual machine, and if the front operation is correct, the dialog box for entering the password will be popped out.
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/70/wKiom1jAFkCCePJKAACwWMmra8w101.jpg-wh_500x0-wm_ 3-wmp_4-s_3564051092.jpg "title=" qq20170308220552.jpg "alt=" Wkiom1jafkccepjkaacwwmmra8w101.jpg-wh_50 "/>
Password is the password of the system in the virtual machine, if the root user is used to log on to use the password, if the ordinary user to use the password of ordinary users, after entering the password can be successfully connected to the system within the virtual machine.
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/6E/wKioL1jAFkHRuYceAABNrX7HDVM031.jpg-wh_500x0-wm_ 3-wmp_4-s_3078975987.jpg "title=" qq20170308221223.jpg "alt=" Wkiol1jafkhruyceaabnrx7hdvm031.jpg-wh_50 "/>
The above is the first way to use the bridge mode, followed by the use of host-only mode of the second method, in this method to use the computer's VMNET1 network card (address in the network connection under the Control Panel)
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8E/70/wKiom1jAFkKDUS7IAABXykDItJo702.jpg-wh_500x0-wm_ 3-wmp_4-s_2950136871.jpg "title=" qq20170308221608.jpg "alt=" Wkiom1jafkkdus7iaabxykditjo702.jpg-wh_50 "/>
View the properties of the VMnet1 NIC in this panel, and find the properties of the Tcp/ipv4 protocol in the properties
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8E/6E/wKioL1jAFkPhZuLBAAARiycuJIM124.jpg-wh_500x0-wm_ 3-wmp_4-s_2811366265.jpg "title=" qq20170308221742.jpg "alt=" Wkiol1jafkphzulbaaariycujim124.jpg-wh_50 "/>
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8E/70/wKiom1jAFkTiRF9UAABrBYoscv8830.jpg-wh_500x0-wm_ 3-wmp_4-s_3244844757.jpg "title=" qq20170308221759.jpg "alt=" Wkiom1jafktirf9uaabrbyoscv8830.jpg-wh_50 "/>
Here the head of the IP to use the following IP address, the IP address to fill in a random, enter after the full subnet mask is automatically filled, Make a note of the first two digits of the IP address (for example, 172.16.1.1 note 172.16) and then save all open property interfaces and close them, then go to the system inside the virtual machine to find the network settings
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/70/wKiom1jAFkSwzyWSAAAhPCEJPzc194.jpg-wh_500x0-wm_ 3-wmp_4-s_701518511.jpg "title=" qq20170308222234.jpg "alt=" Wkiom1jafkswzywsaaahpcejpzc194.jpg-wh_50 "/>
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8E/6E/wKioL1jAFkWAUVtRAABADIkyUsQ772.jpg-wh_500x0-wm_ 3-wmp_4-s_1255790688.jpg "title=" qq20170308222324.jpg "alt=" Wkiol1jafkwauvtraabadikyusq772.jpg-wh_50 "/>
In the settings to change the IP address of the IPV4 to Manual, the first two digits of the IP address is just noted two number, the last two to write casually, as long as the network card does not repeat the line, and then save the exit. The next steps are the same as bridging mode.
Connect a system within a virtual machine using Xshell in your computer