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