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

How to use Xshell to connect to a Linux virtual machine on VMware

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article focuses on "how to use Xshell to connect to the Linux virtual machine on VMware". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use Xshell to connect to the Linux virtual machine on VMware.

Steps:

1. Check the network connection mode of the Linux virtual machine to make sure it is in NAT mode. (since the connection is only made locally, the bridging mode is not selected. Of course, the configuration of the bridging mode will be different, so we will not make an in-depth analysis here)

two。 In VMware workstation, click "Edit"-> "Virtual Network Editor" on the menu bar to open the virtual network editor below. Select VMnet8 (NAT mode), and uncheck [use local DHCP service...] (if checked, dynamic IP will be set).

3. In the following figure, click NAT Settings.

Remember the subnet IP range in the figure above, which indicates that the virtual machine is in the range of 192.168.44.0mm 192.168.44.255.

Note: in the figure above, 192.168.44.2 is the gateway address, 192.168.44.255 is the broadcast address, and 192.168.44.0 is generally the network segment IP, so the three addresses of 0Power2255 cannot be set.

4. Set the IP, DNS, and hostname of the virtual machine

1) set the IP address, subnet mask and gateway, as shown in the following figure.

# vi / etc/sysconfig/network-scripts/ifcfg-ens* (* this article is ens33 depending on the actual situation)

BOOTPROTO=static

IPADDR=192.168.44.3

NETMASK=255.255.255.0

GATEWAY=192.168.44.2

ONBOOT=yes

ONBOOT: refers to whether the network card is activated when the system is started. It defaults to no and is set to yes, which means that the network card is activated when the system is started.

BOOTPROTO: network distribution mode, static. (be sure to change it to Static, otherwise you can't connect to the network.)

IPPADDR: specify the ip address manually.

NETMASK: subnet mask.

GATEWAY: gateway ip.

2) set DNS

# vi / etc/resolv.conf

3) set the hostname

# vi / etc/sysconfig/network

NETWORKING=yes

HOSTNAME=hadoop01

# vim / etc/hostname

Hadoop01

4) after the above files are configured successfully, restart the virtual machine or restart the network card using the service network restart command.

# reboot

5. Set the IP property of VMnet8 on Windows, as shown in the following figure. (open Control Panel-> Network and Internet, click "change Adapter Settings" on the right to enter the "Network connection" page)

6. After configuring the above steps, you can successfully connect to the Linux virtual machine using Xshell.

7. Interlude: when the vim and ifconfig commands cannot be found, you can install them using yum install net-tools/vim.

# yum install-y net-tools

# yum install-y vim

At this point, I believe you have a deeper understanding of "how to use Xshell to connect to the Linux virtual machine on VMware". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Development

Wechat

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

12
Report