Link a virtual machine's CentOS via Xshell

Source: Internet
Author: User

Today in the WIN7 environment through Xshell link VirtualBox centos; always link not, originally because the virtual machine chooses the network link way is not the [Recommended connection method: Host-only Adapter (host mode).

Knowledge Summary:

VBox in the host to simulate a dedicated virtual machine to use the network card, all the virtual machine is connected to the network card, we can set up this network card to achieve the Internet and many other functions. Host mode through the settings of the virtual machine and network card can complete the three kinds of network connection mode to achieve the function.

Nat

Bridged Adapter

Internal

The relationship between the virtual machine and the physical host: The default cannot access each other, the two sides do not belong to the same IP segment, the HOST-ONLY network card default IP field is 192.168.1.X subnet mask is 255.255.255.0, the subsequent virtual machines are assigned to this network segment.

The relationship between the virtual machine and other physical hosts on the network: The default is not accessible to each other, as in the same reason, by setting, you can achieve mutual access.

The relationship between virtual machines and virtual machines: By default, only virtual machines can access each other and are in a single network segment. The so-called host also just says that the virtual host.

First, the CentOS check-in setting:

Execute the following command to have permission if the user does not have permission

1. Turn off pre-fire

Service Iptables Stop

Chkconfig iptables off

2. Start the SSH service

Service sshd Start

3. View the CentOS IP address: ifconfig-a

inet addr:192.168.1.110 bcast:192.168.1.1 mask:255.255.255.0

Then, go back to WIN7 and ping 192.168.1.110 to make sure the virtual machine responds.

C:\users\star>ping 192.168.1.110

Pinging 192.168.1.110 with 32 bytes of data:

Reply from 192.168.1.110: Byte =32 time =1ms ttl=64

Reply from 192.168.1.110: Byte =32 time <1ms ttl=64

Reply from 192.168.1.110: Byte =32 time <1ms ttl=64

Reply from 192.168.1.110: Byte =32 time <1ms ttl=64

Ping Statistics for 192.168.56.101:

Packet: Sent = 4, received = 4, lost = 0 (0% missing),

Estimated time to round trip (in milliseconds):

Shortest = 0ms, longest = 1ms, average = 0ms

Next, set up the virtual machine nic VirtualBox host-only Ethernet Adapter

IP Address: 192.168.1.1 Mask: 255.255.255.0 gateway and DNS server address are not filled in.

Then Xshell play, Session mode select SSH, fill in the virtual host IP address 192.168.1.110.

Link a virtual machine's CentOS via Xshell

Related Article

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.