This article provides a workaround when Junos Space tries to connect to the managed devices over sshd
In some of the Junos device versions, we have seen logs showing multiple SSH connections from Junos Space :
Nov 10 13:09:42 DEVICE_NAME sshd[43916]: Connection closed by x.x.x.x port 46936 Nov 10 13:09:42 DEVICE_NAME sshd[43915]: Connection closed by x.x.x.x port 46936 [preauth] Nov 10 13:09:42 DEVICE_NAME inetd[9887]: /usr/sbin/sshd[43915]: exited, status 255 Nov 10 13:09:42 DEVICE_NAME sshd[43918]: Connection closed by x.x.x.x port 59310 Nov 10 13:09:42 DEVICE_NAME sshd[43917]: Connection closed by x.x.x.x port 59310 [preauth] Nov 10 13:09:42 DEVICE_NAME inetd[9887]: /usr/sbin/sshd[43917]: exited, status 255 Nov 10 13:09:43 DEVICE_NAME sshd[43920]: Connection closed by x.x.x.x port 56784 Nov 10 13:09:43 DEVICE_NAME sshd[43919]: Connection closed by x.x.x.x port 56784 [preauth] Nov 10 13:09:43 DEVICE_NAME inetd[9887]: /usr/sbin/sshd[43919]: exited, status 255
We avoid this issue, we can follow the below workaround:Option 1:
Disable the Network Monitoring service (OpenNMS) from the UI
Administration > Click Application > Right click on Network Management platform > Manage Services
Click on Network Monitoring and click the Stop Service icon
Option 2: If you do not want to disable the complete Network Monitoring service then we can remove the sshd detector
Before you begin take a backup of the files:
cp /opt/opennms/etc/foreign-sources/space.xml /home/admin/space.xml.backup cp /opt/opennms/etc/poller-configuration.xml /home/admin/poller-configuration.xml.backup # vi /opt/opennms/etc/foreign-sources/space.xml **Remove below line** <detector name=SSH class=org.opennms.netmgt.provision.detector.ssh.SshDetector/> # vi /opt/opennms/etc/poller-configuration.xml **Remove below lines** <service name=SSH interval=300000 user-defined=false status=on> <parameter key=retry value=1 /> <parameter key=banner value=SSH /> <parameter key=port value=22 /> <parameter key=timeout value=3000 /> <parameter key=rrd-repository value=/opt/opennms/share/rrd/response /> <parameter key=rrd-base-name value=ssh /> <parameter key=ds-name value=ssh /> </service> <monitor service=SSH class-name=org.opennms.netmgt.poller.monitors.SshMonitor />
Administration > Click Application > Right-click on Network Management platform > Manage Services
Click on Network Monitoring and click the Restart Service icon
By following Option 2, we have removed the sshd detector from the OpenNMS configuration file, which checks SSH connectivity to the managed devices.