xshell failed to connect to the local virtual machine

View the network segment of the local and virtual machine NICs

 

 

View virtual machine IP

Set virtual machine static IP

cd /etc/sysconfig/network-scripts/

vim ifcfg-ens33 

Modified as follows: IPADDR, GATEWAY are the network segments of the virtual machine network card 

service network restart // configuration file takes effect
 

Check whether the static IP of the virtual machine takes effect

Can play happily again

Guess you like

Origin blog.csdn.net/Growing_hacker/article/details/107486431