How to check if SSH service is up and running in Servers

How to check if SSH service is up and running in Servers

Notes
Note: Make sure the ports of the servers are open and the firewall is not blocking connections from the server in which Applications Manager is installed.

Commands to check if the SSH service is running on servers and whether the necessary ports are open:

Linux
sudo systemctl status sshd
sudo netstat -tulnp | grep :22

AIX
lslpp -l bos.net.tcpip | grep ssh
ps aux | grep sshd

Sun Solaris
svcs ssh/tcp
psrinfo -p sshd

Mac OS
sudo systemsetup -getremotelogin
ps aux | grep sshd
lsof -i :22

FreeBSD
service sshd status
ps aux | grep sshd
netstat -an | grep :22

HP-UX
svcadm status svc:/network/ssh
ps aux | grep sshd

                  New to ADSelfService Plus?