I know we can print every process on the Ubuntu system with this command:
ps -au
But How to print only process numbers for the SSH server?
I know we can print every process on the Ubuntu system with this command:
ps -au
But How to print only process numbers for the SSH server?
If you want to see just the process numbers, you can use:
pgrep sshd
If you would like to see columns of data with more information than process numbers, you can use:
pgrep -a sshd
or
ps -aux|grep '[s]shd'