The solution to the problem that xshell cannot connect to the virtual machine: first test whether the network is connected; then click [Manage] and select [Host Network Manager]; then check the network IP settings; finally use xshell to connect to the remote host. Can.
The operating environment of this article: Windows 7 system, xshell version 5, Dell G3 computer.
Solution to the problem that xshell cannot connect to the virtual machine:
1. Test whether the network can be connected normally:
Test the network connection method:
(1) Use xshell to connect to the remote virtual machine, but cannot connect;
(2) Locally ping the remote virtual machine IP address, the connection times out;
(3) SSHD is not enabled The service can be accessed through the system by entering: service sshd status command on the command line
(4) In the virtual machine, enter: curl www.baidu.com command on the command line. External network address
(5) Check whether the firewall of the virtual machine is turned on. In the virtual machine, enter: systemctl status firewalld command on the command line to check the status of the firewall
2. If the sshd service and The firewall is running normally. Open the virtual machine management interface, click [Manage], select [Host Network Manager]
3. Check the network IP settings. If they match those in the remote host If the IP address has been configured, change [Manual network card configuration] to [Automatic network card configuration]
4. At this time, use xshell to connect to the remote host, and you can access MySQL normally. The service can also be accessed normally
Related free learning recommendations:php programming(video)
The above is the detailed content of xshell cannot connect to the virtual machine. For more information, please follow other related articles on the PHP Chinese website!