We mainly use SSH for the purpose of securely logging in to a remote system. Most Linux distributions come with the SSH package, by default. In order to verify whether SSH is currently running, we use the systemctl command; we pass the status option, as follows:

The SSH daemon ssh.service is currently running (particularly, the Secure Shell server). Another method that we can use to verify that the SSH service is running is the netstat command; we pass the ntlp options (n for display port numbers, t for TCP protocol, l for currently listening, and p for program ID/program name), as follows:

root@Linuxplus:/home/philip# netstat -ntlp

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.