How many processes should there be for the ssh agent?

Good day
I wonder how many processes there should be for ssh agent?
Currently, I have three, even if agent is disconnected. I’d killed all java processes, and later they appeared.

$ ps aux | grep 'java -jar'
jenkins   4739  1.2  1.9 8771152 317360 ?      Sl   07:39   0:44 java -jar remoting.jar -workDir /var/lib/jenkins -jar-cache /var/lib/jenkins/remoting/jarCache
jenkins   4974  0.8  1.3 8771172 212080 ?      Sl   07:39   0:29 java -jar remoting.jar -workDir /var/lib/jenkins -jar-cache /var/lib/jenkins/remoting/jarCache
jenkins   6731  0.8  0.9 8565052 148992 ?      Sl   08:02   0:17 java -jar remoting.jar -workDir /var/lib/jenkins -jar-cache /var/lib/jenkins/remoting/jarCache

Sometimes, the number of these processes increases, and I don’t know if this is normal behavior.
I’m using until the next update:

  • jenkins 2.263.3
  • ssh-build-agent 1.821.vd834f8a_c390e

I see 3 processes for each of the ssh build agents that I run:

mwaite@testing-a:~$ ps -fu jagent
UID          PID    PPID  C STIME TTY          TIME CMD
jagent   1188297 1188288  0 02:44 ?        00:00:07 sshd: jagent@notty
jagent   1188301 1188297  0 02:44 ?        00:00:00 bash -c mkdir -p /home/jagent/;cd "/home/jagent/" && /home/jagent/tools/jdk-11.0.15+10/bin/java
jagent   1188303 1188301  0 02:44 ?        00:03:44 /home/jagent/tools/jdk-11.0.15+10/bin/java -jar remoting.jar -workDir /home/jagent/ -jar-

The ps -fu jenkins output for you may show the same parent to child process relationship that I see. the sshd parent process runs a bash child process that does some initial setup and then calls the java process that is the Jenkins agent

Yes, but sometimes their number is increasing, and I’m not sure, that is normal behavior.