Add unit tests for SshMonitor, fix NMS-6479.