Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Link the CentOS of the virtual machine through XShell

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Win7 environment through XShell link VirtualBox CentOS; always can not be linked, because the virtual machine chose the wrong way to link to the network.

[recommended connection method: Host-only Adapter (host mode)]

Knowledge Abstract:

VBox simulates a network card dedicated to virtual machines in the host, and all virtual machines are connected to the network card. We can set up this network card to achieve Internet access and many other functions. The host mode can complete the functions of the following three network connection modes through the setting of virtual machines and network cards.

NAT

Bridged Adapter

Internal

Relationship between virtual machine and physical host: they cannot access each other by default, and they do not belong to the same IP segment. The default IP segment of host-only Nic is 192.168.56.X.

The subnet mask is 255.255.255.0, and the following virtual machines are assigned to this network segment.

The relationship between virtual machines and other physical hosts in the network: by default, they cannot access each other for the same reason as above. By setting, they can access each other.

Virtual machine-virtual machine relationship: by default, only virtual machines can access each other, all in the same network segment. The so-called HOST only says-virtual host.

First, check the settings on CentOS:

1. Before turning off fire prevention

Service iptables stop

Chkconfig iptables off

two。 Start the ssh service

Service sshd start

3. Check the IP address of CentOS: ifconfig-a

Inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0

4. Then, go back to PING 192.168.56.101 under WIN7 and make sure the virtual machine responds.

C:\ Users\ yours > ping 192.168.56.101

Ping 192.168.56.101 has 32 bytes of data:

Reply from 192.168.56.101: byte = 32 time = 1ms TTL=64

Reply from 192.168.56.101: bytes = 32 time

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report