Xshell+Vbox+centOS7 installation, configuration, connection

Xshell+Vbox+centOS7 installation, configuration, connection

The first time I used these software, I encountered a lot of problems, and it took a lot of time to finally connect. Let me summarize the process.

Install and configure cents in VBox

Installation configuration reference: https://blog.csdn.net/lllllyt/article/details/82634089
Note when configuring: because in the reference blog, the network address translation (NAT) + Host Only mode (dual network card) is used when configuring the network Mode), so when configuring this configuration, two network segments NAT (enp0s3) and host-only (enp0s8) will appear in the virtual machine. The IP address in enp0s8 should be different from the IP address of the corresponding Adpter but in the same network part

Gateway configuration reference

Reference article: https://jingyan.baidu.com/article/ed15cb1b86ebb21be36981b5.html
Centos7 solves networking (ping Baidu fails): I found many examples on the Internet, all of which added DNS and checked the ip address, but it didn’t work. Refer to The above article (only with modifying the gateway part) was resolved.
The gateway configuration adopts the IP address of the Adapter.

Xshell connects to the virtual machine

First, I learned about the connections in several different networks in centos 7.
Reference article: https://jingyan.baidu.com/article/9f7e7ec04f73c66f28155484.html
After viewing a lot of articles, there are two ways to summarize
1. After completing the above network configuration in dual network card mode
(you can ping the host and the external network), Enable the ssh service in the virtual machine and connect with Xshell.
Reference article: https://blog.csdn.net/trackle400/article/details/52755571/
2. NAT port forwarding
is another common method of connecting virtual machines with xshell, using NAT network, which is displayed in the four connection methods of centos7 , the NAT network can only connect the virtual machine to the host, and the host cannot connect to the virtual machine through this network segment. However, it can be connected through the port settings in NAT, through port forwarding, and different ports are set for the two connections. Reference: https://blog.csdn.net/qq_25868251/article/details/82419410 (not tried).

Novice Xiaobai, if there are any omissions or wrong descriptions in the article, I hope everyone will not blame them, and must actively correct them~

Guess you like

Origin blog.csdn.net/qq_43341918/article/details/106591291