Xshell link Could not connect to ' 192.168.80.129 ' (port): Connection failed

Source: Internet
Author: User
Tags iptables

When using Xshell to link Linux in VM VMS, the link fails,

' 192.168.80.129 ' (): Connection failed

Steps to resolve:

1. Restart VM, Linux, Xshell

2. Restart the unresolved words, local command line ping Linux IP

192.168. 80.129

3, the local command line Ping Pass, turn 5th step.

C:\users\administrator>ping192.168.80.129is pinging192.168.80.129Has +bytes of data: from192.168.80.129The reply: byte = +Time =1ms ttl= -from192.168.80.129The reply: byte = +Time <1ms ttl= -from192.168.80.129The reply: byte = +Time <1ms ttl= -from192.168.80.129The reply: byte = +Time <1ms ttl= -192.168.80.129Ping Statistics: packets: Sent=4, received =4, missing =0(0%lost), estimated time to round trip (in milliseconds): Shortest= 0ms, maximum = 1ms, average = 0ms

4, the local command line Ping does not pass, check the network of Linux, specific: Enter Ifconfig under Linux, the IP is not seen at this time. Next execute Vi/etc/sysconfig/network-scripts/ifcfg-eth0, after opening the file, found that the file is empty, it may be accidentally deleted this file. Enter the following information in this file:

device=eth0onboot=Yesbootproto=staticipaddr=192.168. 80.129 NETMASK=255.255. 255.0 GATEWAY=192.168. 80.2

Where ipaddr is set according to its own needs. My this setting of the virtual machine private network IP is 80 network segment, here, my ipaddr set is 192.168.80.129,gateway set is 192.168.80.2

After Setup is complete, save to exit.

Enter Ifconfig again at this point and you can see the IP address.

5. Turn off the Linux firewall

Service Iptables Stopchkconfig iptables off

6. Start the SSH service

Service sshd Start

If startup is unsuccessful, you need to install SSH

Installing Ssh:yum install OpenSSH-server

SSH services on: Service sshd start off SSH service: Service sshd stop restart SSH service: Servcie sshd restartssh service on auto start: chkconfigsshd on cancel boot: Chkconfig sshd off after service, check service status: Services sshd status

7. In Windows, open the command line and the following message appears

C:\users\administrator>ping192.168.80.129is pinging192.168.80.129Has +bytes of data: from192.168.80.129The reply: byte = +Time =1ms ttl= -from192.168.80.129The reply: byte = +Time <1ms ttl= -from192.168.80.129The reply: byte = +Time <1ms ttl= -from192.168.80.129The reply: byte = +Time <1ms ttl= -192.168.80.129Ping Statistics: packets: Sent=4, received =4, missing =0(0%lost), estimated time to round trip (in milliseconds): Shortest= 0ms, maximum = 1ms, average = 0ms

Indicates successful connection

8. You can successfully connect to local Linux again via Xshell.

Xshell link Could not connect to ' 192.168.80.129 ' (port): Connection failed

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.