How to configure check_by_ssh plugin

  1. Add nagios user on the remote host

useradd nagios

  1. Generate public/private keypair on the nagios server

su - nagios -s /bin/bash

ssh-keygen

  1. Copy the public key on remote host

ssh-copy-id -i .ssh/id_rsa.pub server.example.org

  1. Create the directory for plugins on the remote host

su - nagios

mkdir .ssh/bin

  1. Test the connection on the nagios server

ssh server.example.org