Book Image

Learning Nagios 3.0

Book Image

Learning Nagios 3.0

Overview of this book

Table of Contents (16 chapters)
Learning Nagios 3.0
Credits
About the Author
About the Reviewer
Preface

Configuring SSH


Setting up remote checks over SSH requires a few steps. The first step is to create a dedicated user for performing checks on the machine that they will be run on. We will also need to set up directories for the user. This is very similar to the steps performed for the entire Nagios installation.

The first thing that needs to be performed on the Nagios server is to create a private and public key pair that will be used to log into all remote machines without using a password. We will need to execute the ssh-keygen command to generate it. A sample session is shown below:

root@nagiosserver:~# su -s /bin/bash nagios

nagios@nagiosserver:~$ ssh-keygen

Generating public/private rsa key pair.
File in which to save the key (/opt/nagios/.ssh/id_rsa): <enter>

Created directory '/opt/nagios/.ssh'.
Enter passphrase (empty for no passphrase): <enter>

Enter same passphrase again: <enter>

Your identification has been saved in /opt/nagios/.ssh/id_rsa.
Your public...