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 CentOS7 connects XShell to network configuration

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

What the editor wants to share with you this time is how CentOS7 connects XShell and network configuration. The article is rich in content. Interested friends can learn about it. I hope you can get something after reading this article.

1. Linux network configuration

Before configuring the network, you must first obtain the local IPv4 address and default gateway and other information.

There is no network configuration option to use the setup command after installing centOS7. To configure the network, use the nmtui command. Enter the following interface.

Use the keyboard arrow keys to select the first item Edit a connection, and enter to enter the editing interface. The default network card of CentOS7 is eno16777736. Select Edit and press enter.

Then add the obtained IPv4 and default gateway information to the appropriate location. The first three fields of the IPv4 address should be the same, and the last field can be arbitrary.

Select OK, return layer by layer, check Quit, you will go to the command line, use the nmtui command again, select Activate a connection, activate the connection, and enter.

After entering the activation page, select activate enter. Finally exit, will go to the main page. Use the ifconfig command to view the relevant information.

2. Connect XShell

Open XShell, create a new session, and fill in the IPv4 address configured in the Linux system in the host, as shown in the following figure.

Then, you can click user Authentication and enter the user name and password of the linux system. (this step is not required)

Finally, there is a small problem to note that when connecting to XShell, the local network should be the same as the network when configuring Linux, otherwise it will not be connected. For example, when configuring, fill in the home network in the Linux, and then go out to the company, and the local network is connected to the company's wireless, so it is not possible to connect to the home network that has just been configured.

3. Default boot self-boot Nic

Sometimes you can't connect to XShell because the network card in Linux is not open. You can use the su command to switch to superuser mode and then use ifup eno16777736 (device network card name) to view it. However, the system defaults to manually opening the network card, and when it is used again after shutting down, the network card is still closed. The solution is as follows:

TYPE=EthernetBOOTPROTO=noneDEFROUTE=yesIPV4_ FAILURE_ FATAL=noIPV6INIT=yesIPV6_ AUTOCONF=yes IPV6_ DEFROUTE=yesIPV6_ FAILURE_ FATAL=noNAME=eno16777736 UUID=01974b05 08EC-4950-af02 bd434293b7bb DEVICEeno16777736ONBOOT=yes IPADDR=192.168.1.14 PREFIX=32GATEWAY=192.168.1.1IPV6_ PEERDNS=yesIPV6_ PEERROUTES=yes

1. Enter the directory / etc/sysconfig/network-scripts/

two。 Modify the ifcfg-enxxxxxxxx file (that is, the configuration file named by your network card ID)

3. Change ONBOOT=no to yes

4. Just restart after saving.

After reading this article on how CentOS7 connects XShell to network configuration, if you think the article is well written, you can share it with more people.

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

Servers

Wechat

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

12
Report