Nagios 3 and SSH

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Metalliogre
Posts: 17
Joined: Mon Jun 02, 2014 6:57 pm

Nagios 3 and SSH

Post by Metalliogre »

I am getting a 'connection refused' on my SSH in Nagios. I couldn't find squat on how to configure. Any advice would be helpful. Thanks! Screenshot is attached.
Attachments
ssherror.png
Jeremiah Slagle,
JNB Productions

www.YouTube.com/JeremiahSlagle
@JupeBobby
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 3 and SSH

Post by slansing »

Do you have an ssh daemon running on the local nagios server? Is port 22 open?
Metalliogre
Posts: 17
Joined: Mon Jun 02, 2014 6:57 pm

Re: Nagios 3 and SSH

Post by Metalliogre »

No sir. I am not aware on how to take these steps. Any helpful info would be greatly appreciated.
Jeremiah Slagle,
JNB Productions

www.YouTube.com/JeremiahSlagle
@JupeBobby
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios 3 and SSH

Post by tmcdonald »

Depending on your server's OS, you might have to install SSH in a different way. It looks like you are running Debian, so this should work:

Code: Select all

sudo apt-get install openssh
Former Nagios employee
Metalliogre
Posts: 17
Joined: Mon Jun 02, 2014 6:57 pm

Re: Nagios 3 and SSH

Post by Metalliogre »

Thank you! I will try as soon as possible. How do I go about opening port 22? Thanks!
Jeremiah Slagle,
JNB Productions

www.YouTube.com/JeremiahSlagle
@JupeBobby
Metalliogre
Posts: 17
Joined: Mon Jun 02, 2014 6:57 pm

Re: Nagios 3 and SSH

Post by Metalliogre »

Tried that command and got a 'cannot find openssh package' error.
Jeremiah Slagle,
JNB Productions

www.YouTube.com/JeremiahSlagle
@JupeBobby
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 3 and SSH

Post by abrist »

Try:

Code: Select all

apt-get install openssh-server
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Metalliogre
Posts: 17
Joined: Mon Jun 02, 2014 6:57 pm

Re: Nagios 3 and SSH

Post by Metalliogre »

Did this and it solved my SSH problem! Thanks! Here is a nice guide on how to configure SSH-Server.
http://www.jonathanmoeller.com/screed/?p=3606
Jeremiah Slagle,
JNB Productions

www.YouTube.com/JeremiahSlagle
@JupeBobby
Metalliogre
Posts: 17
Joined: Mon Jun 02, 2014 6:57 pm

Re: Nagios 3 and SSH

Post by Metalliogre »

It started refusing my SSH connection again :(
Jeremiah Slagle,
JNB Productions

www.YouTube.com/JeremiahSlagle
@JupeBobby
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios 3 and SSH

Post by tmcdonald »

It's been a while since my Ubuntu days, forgot about the "-server" part :)

Did you change the port like they did in the article? You should probably keep it on port 22, otherwise you will need to edit the Nagios checks to use the new port.

Also, did you open up/disable the firewall? http://www.howtogeek.com/115116/how-to- ... -firewall/
Former Nagios employee
Locked