This article describes an issue where SSH sessions on managed devices get exhausted by multiple connections from Junos Space.
The symptoms can be seen below:
We can verify the SSH connection created by Junos Space as below from Junos Space CLI:
netstat -anlp | awk '{print $5}' | grep ":22" | grep <Managed_Device_IP> OR
netstat -anlp | awk '{print $5}' | grep ":22" | sort | uniq -c
Ideally, there should be single SSH connection.This is a reported bug in Junos Space that has been resolved in the latest releases and as a workaround to kill these sessions, we can restart the JBoss service on Junos Space ( KB31228 [juniper.net] )
PR 1684165 should be fixed in the versions below and later:21.3_HPV622.1_HPV222.2_HPV1
Also, make sure you have the same patch installed on all the Space nodes.
# ls -al /etc | grep -i hotpatch
2024-07-12 : Article Created
2025-07-29: Platforms added
2025-11-09:Minor edits and visibility changed