Xshell connection server and not connected to the external network and other issues

Source: Internet
Author: User
Tags iptables server port

最近,安装了一下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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.