Connect Remote Server to network
In this article, we have presented the commands required to connect a remote server to network (when you have access through KVM) so that you can login to the system remotely.
Table of contents:
- Commands to connect server to network for remote access
- Understanding the commands
Commands to connect server to network for remote access
Connect to KVM and follow the following commands to connect remote server to network so that you can login to the system remotely:
ifconfig -a
sudo ifconfig <network_interface> up
sudo dhclient
ifconfig
Get the IP from the above commands and login to the system remotely using MobaXterm or other client.
Understanding the commands
Using the command ifconfig -a
, you are listing all the network interfaces that are available to the server. We need to identify the one that is connected to the Internet. There may be loop interfaces which we shall avoid. The option -a is to list all interfaces.
The network interface can be like enp300d0.
The second command sudo ifconfig <network_interface> up
will turn on the particular network interface.
The third command dhclient
will request the DHCP server for an IP address which can be used to access the system.
The fourth command ifconfig
will help us see the IP address that has been assigned to the concerned network interface using the previous command.
Once we have the IP address, you can login to the server remotely or use command like scp which requires accessing the system remotely.
With this article at OpenGenus, you must have the complete idea of how to connect a remote server to the network for remote access.