You installed a couple of virtual machines in your lab and now you ask yourself how you can manage them without needing to log onto each one using the graphical user interface (GUI). The short answer is SSH. You need to install SSH and use it for managing the VMs (virtual machines).

SSH, short for Secure Shell, is a protocol developed to substitute telnet. Telnet is an old protocol which permits you to manage different VMs and network devices like switches and routers. It is very easy to use. However, it has a significant limitation. All the data between the client machine and the server is transmitted in clear text. This means that you can be subject to a man in the middle attack (MITM). An attacker can spot your username and password and can take control of your devices.
SSH is the secure alternative. All the data between your client machine and your target device is encrypted. This is good news and it means that you can manage devices located in different corners of the world, over the Internet, without any concern.
SSH is developed based on a client-server architecture. You need to have an SSH client installed on your machine. Usually, all modern operating systems (like Linux, macOS, Windows 11) have it installed by default. Your task is to install SSH on all the devices that you want to manage (Linux servers, switches and routers).
In this post, I would like to show you how you can install SSH on a Ubuntu machine.
Table of Contents
1. Search for SSH software
The first step that you need to take is to connect your Ubuntu machine via GUI and open a terminal.
Next, you need to update the repository metadata with the command:
sudo apt-get update

Next, you need to search for the a package which contains the SSH software:
sudo apt-cache search ssh | grep '^ssh '

2. Install SSH
After you have identified the packet, you need to install it.
Please run the command:
sudo apt-get install ssh

3. Check SSH status
Now, it is the time to check if the SSH software is running on your machine. Ubuntu, by default, enables the service and starts it. However, a verification step does not take long and it gives you the confidence that SSH is running as it should.
systemctl status sshd

4. Check the IP address of the VM
Now, that you are sure that SSH is running as it should, you need to note down the IP address of your VM. You will need it in order to connect to the machine via SSH.
ip add show

5. Connect to the VM via SSH
Finally, you have all the details for connecting to your Ubuntu machine over SSH. Specify your username and the IP address of your machine. When prompted, enter your password. You are now connected to your machine.
Repeat the same steps for all the other machines on which you want to install SSH.
ssh petru@192.168.1.130

I hope you find this post helpful.
If you struggle to install SSH on your Ubuntu machine, share your issue in the comments and I will try to help you.
[…] Last time, I wrote about SSH. I explained how to install it on a Ubuntu machine and showed you how to use it. If you want to read the previous post, you can find it here. […]
[…] a separate cable. And the answer is yes, there is a different method you can use. You can use the SSH protocol for managing your Cisco […]