最近,安装了一下CentOS7的系统,发现身边的还是有很多小伙伴(包括我自己哈)在Xshell最近安装了一下CentOS7的系统,发现身边的还是有很多小伙伴(包括我自己哈)在Xshell连接服务器时,还是会出现问题,所以,我今天就这些问题做个小结。
First of all, let me explain the common router mode.
1. Nat Mode diagram
2. Bridging mode
Xshell not connected to the server
1, troubleshooting steps.
1) Check the road does not pass.
Ping IP Address
2) Whether SELinux or iptables is turned off.
3) Whether the service side provides services
Netstat-lntup|grep sshd
Ps-ef|grep sshd
################################################################
If the ping IP address does not pass:
The first step is to check the net. ifconfig
If Ifconfig shows that your network card is up, check for additional reasons, and if not, check your network adapter profile
Focus on the correct location of the red flag. If the virtual editor chooses the red DHCP in the image below, then BOOTPROTO=DHCP can
If not checked, you need to change bootproto=none or static.
After configuring the NIC, restart the NIC service network restart.
###############################################################
The second step is if the NIC starts successfully, such as.
Re-check your virtual editor and the current virtual machine configuration is correct
################################################################
The third step is to check if the Xshell editor is correct
###############################################################
Fourth step, check if SELinux is off
Selinux=enforcing change to selinux=disabled display as can
##############################################################
Fifth step, turn off firewall iptables
CentOS7 with Systemctl stop Firewalld.service
View
CentOS6 with/etc/init.d/iptables stop
View/etc/init.d/iptables Status
##############################################################
Sixth step check that the server port is open
Check if the process is turned on
################################################################
Seventh, check the local service configuration to make sure the service is open
################################################################
Eighth step, if still not even, check the configuration of VMnet8 virtual network card, some computers can not automatically get, you need to according to your network segment situation to give it a.
############################################################################################################### #################
At this point, Xshell even the server should be fine.
Ping does not pass the outside network
Let us say that even the problem of the external network cannot be connected to the two main aspects of the external network.
1. Your virtual editor is configured correctly, subnets and gateways are correct
2, the DNS configuration is correct. First you need to understand DNS, it is recommended to look at the following links
https://m.douban.com/mip/note/373697762/
We generally use Ali's DNS 223.5.5.5 or 223.6.6.6, you can also use 8.8.8.8 ha
Make sure the DNS configuration of the/etc/resolv.conf is correct. Even the Sisu network is not a problem.
I hope this article is helpful to everyone.
Xshell connection server and not connected to the external network and other issues