Joe Asked: 2019-06-25 18:53:58 +0800 CST2019-06-25 18:53:58 +0800 CST 2019-06-25 18:53:58 +0800 CST How to check and ensure SSH is accepting connections? 772 I was wondering how someone would check if SSH is accepting connections. ssh 1 Answers Voted Best Answer Doug Smythies 2019-06-25T19:12:52+08:002019-06-25T19:12:52+08:00 Use the netstat command to observe what is listening on each port: doug@DOUG-64:~$ sudo netstat -tlnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1097/smbd tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1327/mysqld tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1097/smbd tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1362/apache2 tcp 0 0 192.168.111.1:53 0.0.0.0:* LISTEN 1235/named tcp 0 0 my-external-ip:53 0.0.0.0:* LISTEN 1235/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1235/named tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1335/sshd tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1545/master tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1235/named Observe the Secure Shell server daemon listening on port 22.
Use the netstat command to observe what is listening on each port:
Observe the Secure Shell server daemon listening on port 22.