What should I do if centos cannot connect to xshell?

王林
Release: 2020-04-04 10:10:39
Original
3549 people have browsed it

What should I do if centos cannot connect to xshell?

1. Check whether the local physical machine can ping successfully

2. If so, turn off the firewall and disable the firewall from starting at boot (CentOS 7)

systemctl stop firewalld.service
firewall-cmd --state
systemctl disable firewalld.service
Copy after login

3. If the local command line ping fails, check the Linux network

Specific: Enter ifconfig under Linux, but you cannot see the IP at this time.

Next, execute vi /etc/sysconfig/network-scripts/ifcfg-eth0. After opening the file, you find that the file is empty. This may be because the file was accidentally deleted. Enter the following information in this file:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.81.129
NETMASK=255.255.255.0
GATEWAY=192.168.81.2
Copy after login

where IPADDR is set according to your needs. The IP of my private network for the virtual machine is set to network segment 81. Here, my IPADDR is set to 192.168.81.129, and GATEWAY is set to 192.168.81.2

After the settings are completed, save and exit.

At this point, enter ifconfig again and you can view the IP address.

Recommended related tutorials: centos tutorial

The above is the detailed content of What should I do if centos cannot connect to xshell?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template