Using Xshell to link Linux in a local virtual machine

Source: Internet
Author: User

Yesterday want to install Linux on their own machine, and use Xshell access, but for a long time, on the Xshell side are prompted "Could not connect to ' 192.168.54.100 ' (port): Connection failed "For a long time on the internet and no solution was found. Finally in an article that may be the Linux firewall is not off, SSH service did not start, and then all the re-installed, and the firewall shut down, SSH started, and finally succeeded! Now write my process, hoping to help others!

1. Install VMware11.0, this software has many on the net, also has cracked version

2. Install Centos-6.5-x86_64-livedvd.iso, I use this version is also downloaded from the Internet, more than 700 m; on the internet there is a minimum system, I have tried, do not know why is not installed, if someone with that installation success, please advise.

3. Follow this tutorial,

Http://wenku.baidu.com/link?url= Kornmzlj-aiwfwz24dmdlfqalsw8ragiubljzhf05fevbpdowh0e53reuq5hq4rujsktytq78bgfb4umuycnuqn_qf7wqv6fif_rq5vgpn_

After operation to the 16th step, no longer reference. At this point, I entered the Setup command under Linux and did not find any information in "EDIT DEVICES". I think it should be the previous operation has removed some configuration files. It doesn't matter, we can build a configuration file ourselves.

4. Enter ifconfig under Linux and you cannot see the IP at this time. Next Execute VI /etc/sysconfig/network-scripts/ifcfg-eth0, after opening the file, found that the file is empty, because the previous steps to remove the file. Enter the following information in this file:

Device=eth0
Onboot=yes
Bootproto=static
ipaddr=192.168.1.8
netmask=255.255.255.0
gateway=192.168.1.1

Where ipaddr is set according to its own needs. I set the virtual machine private network in front of the IP for 54 segment, here, my ipaddr set is 192.168.54.100,gateway set is 192.168.54.1

After Setup is complete, save to exit.

Enter Ifconfig again at this point and you can see the IP address. Enter setup, or you can see the information you just set up in EDIT DEVICES. Native IP Settings succeeded

5. Turn off the Linux firewall

Service Iptables Stop

Chkconfig iptables off

6. Start the SSH service

Service sshd Start

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

C:\users\administrator>ping 192.168.54.100
Pinging 192.168.54.100 with 32 bytes of data:
Reply from 192.168.54.100: Byte =32 time <1ms ttl=64
Reply from 192.168.54.100: Byte =32 time <1ms ttl=64
Reply from 192.168.54.100: Byte =32 time =1ms ttl=64
Reply from 192.168.54.100: Byte =32 time <1ms ttl=64

Ping Statistics for 192.168.54.100:
Packet: Sent = 4, received = 4, lost = 0 (0% missing),
Estimated time to round trip (in milliseconds):
Shortest = 0ms, longest = 1ms, average = 0ms

Indicates successful connection

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


By summing up the above process, in fact, after the installation of Linux, I have looked at the IP address of Linux, but also in Windows Ping this address, in fact, is through, but with the shell is not connected. Now think about it, if you can ping, say that the network connection is normal, should be Linux side prohibit connection. At this point, the direct implementation of 5th, 6, 7 should be able to connect. Because of time, this I have not tried, interested friends can try.

I just learned Linux, the article may have the wrong place, welcome you to communicate, correct me.

Using Xshell to link Linux in a local virtual machine

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.