We use an alias for getting information how many established connections are for sshd process name. Recently we updated all our packages. Even we have lots of connections to sshd server, they are not reported by process name in netstat. Process name appears as a figure, the first one is 0 and increments by 1.
Netstat - Missing sshd process name from result
I am using netstat command then grepping by process name then by port as root. Listen ports shows correctly PID/process name, but for Established connections it shows PID/number. Process name is missing for established connection.
/proc/<pid>/cmdline
should be appended innetstat
, after the PID itself. – Thomas Jan 10 '16 at 16:49tcp 0 0 192.168.159.102:22 192.168.159.1:50275 ESTABLISHED 4383/sshd: root@not tcp 0 64 192.168.159.102:22 192.168.159.1:50308 ESTABLISHED 4471/0
As you can see both are established, the one from WinSCP shows correctly the process name. The other one from PuTTY shows only 0.
– ADDISON74 Jan 10 '16 at 18:40