1

I have installed freeSSHD on my Windows machine, created a user, enabled tunneling, copied over a public rsa key, and installed NSClient++. On my Nagios server, I have Nagios running and a Windows.cfg file that looks correct.

I am able to ssh from the nagios box to the windows box with the following:

ssh user@windows-box-ipaddr

and

ssh -f -N -L 127.0.0.1:1433:windows-box-ipaddr:1433 administrator@windows-box-ipaddr

Despite this, I'm seeing errors such as these in Nagios:

connect to address 127.0.0.1 and port 12489: Connection refused

I am not sure what IP address needs to go in the windows.cfg for the define host, nor am I sure what the NSClient++ IP should be set to.

What I do know for certain is that I can get this servers to connect through SSH. I am thinking that I should be using another port or perhaps I need to open many ports in the firewall. At this point I am at a standstill.

2
  • what are you trying to do, exactly? and why does it involve ssh tunneling? – Keith Mar 3 '17 at 0:51
  • Keith, I am trying to monitor a Windows server that is not on our network. Either a VPN or SSH tunnel appear to be the most effective ways to accomplish this. – RE_Woods Mar 3 '17 at 3:59
0

NSCLient++ by default uses port 12489, as the error message reports.

Try

ssh -f -N -L 12489:localhost:12489 administrator@windows-box

Of course this requires that NSClient++ is actually running and listening on that port. Your command would forward port 1433 - where did you get that port number?

3
  • Some bum docs I read... It's working now thank you. I am trying to get Tomcat and Apache to show up now... – RE_Woods Mar 2 '17 at 23:22
  • Is there a way to monitor apache and Tomcat? – RE_Woods Mar 3 '17 at 0:02
  • Please ask this as a new question, after using the site search. And if this answer solves your problem, please accept it (see the help center to learn about how the site works). – Sven Mar 3 '17 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.