Xshell connects to the virtual machine on VMware
documents required
The CentOS mirror I use is the mirror on the open source mirror site of Nanjing University
Xshell is a free version that can be downloaded from the official website
step:
1. Check the network connection mode of the Linux virtual machine to make sure it is NAT mode.
2. On the VMware interface, click Edit option—[Virtual Network Editor], select VMnet8 (NAT mode), uncheck [Use local DHCP service], if DHCP service is used, IP will be dynamically assigned
3. After setting, click NAT setting.
192.168.22.0 represents the network segment IP, 255.255.255.0 represents the subnet mask, and 192.168.22.2 is the gateway address. We cannot use the addresses 0 and 2 when setting the IP of the virtual machine.
4. Set the virtual machine IP, gateway, DNS and host name.
If you don't know vim, refer to the common shortcut keys of VIM , which is summarized in detail.
1) Set the IP address, subnet mask and gateway.
vim /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static //The network allocation method is static
IPADDR=192.168.22.3 //The set IP address
NETMASK=255.255.255.0 //Subnet mask
GATEWAY=192.168.22.2 //Gateway
ONBOOT=yes //Indicates whether the system starts Activate network card
2) Set DNS
vim /etc/resolv.conf
3) Set the hostname
vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=Coo01
vim /etc/hostname
4) After the file configuration is complete, restart the virtual machine.
service network restart
restart network card
reboot
Restart the virtual machine
5. Set the IP properties of VMnet8 on Windows.
Right-click and select Personalization, select [Network and Internet], click the advanced network settings below, and select [More network adapter options]
6. After configuring the above steps, you can successfully use Xshell to connect to the Linux virtual machine.
Click Connect, enter the user name and password to connect.