Mint

How Can You Check if SSH is Running on Your Linux Mint 20 System

Introduction:

SSH is an application layer protocol for ensuring the security of your communication while you operate with an insecure network. It is one of the most crucial protocols of information security. Most flavors of the Linux operating system have SSH installed by default on them. However, you can always check if it is running on your system or not. To figure out the methods of doing so, you will have to thoroughly go through this article.

Methods of Checking if SSH is Running on a Linux Mint 20 System:

To check if the SSH server is running on a Linux Mint 20 system, any of the following five methods can be used.

Method # 1: Using the “systemctl” Command:

For this method, you will need to execute the command shown below:

$ sudo systemctl status sshd

The “active (running)” status in the output of this command represents that SSH is running on our Linux Mint 20 system.

Method # 2: Using the “ps” Command:

The “ps” command can be used in the following manner to check if SSH is running on our Linux system or not:

$ ps aux | grep sshd

The “listener” status against the sshd process in the output of this command implies that SSH is running on our Linux Mint 20 system.

Method # 3: Using the “telnet” Command:

The “telnet” utility can also be used to check the status of SSH by executing the command shown below:

$ telnet localhost 22

Here, “22” refers to the port to which SSH is allowed to listen by default. However, if in your case, you have configured it to listen on some other port, then you will have to replace “22” with your specific port number.

Since the connection to the specified port has been made successfully as you can see from the following image, hence, we can say that SSH is running on our Linux Mint 20 system.

Method # 4: Using the “netstat” Command:

The “netstat” command can also be used to check the status of SSH. However, before doing so, the “netstat” command should be installed on your Linux Mint 20 system. It can easily be installed through the execution of the below-shown command:

$ sudo apt install net-tools

The “netstat” command resides within the “net-tools” package. Once this package will be successfully installed, you will be able to use the “netstat” command.

Now, you can use the “netstat” command to check SSH status in the following manner:

$ sudo netstat –plant | grep :22

The output of this command will verify that SSH is listening on port 22 on our Linux Mint 20 system.

Method # 5: Using the “lsof” Command:

Finally, we can use the “lsof” command to check if SSH is running on our Linux system or not by executing it in the manner shown below:

$ sudo lsof –i

You can skip the “sudo” keyword in this command if you are a “root” user. Otherwise, you will have to use this keyword for the desired output to be displayed.

The “LISTEN” status with the sshd process indicates that SSH is running on our Linux Mint 20 system.

Conclusion:

In this article, we presented to you the five different methods of checking if SSH is running on your Linux Mint 20 system or not. Any of these methods can be followed according to the user’s choice. The commands that we have used in all of these methods were built-in except for the “netstat” command. But the “netstat” command can also be installed very quickly on a Linux Mint 20 system.

Similar Posts