monitoring hosts using ssh - can you change default account?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paulconca
Posts: 31
Joined: Tue Jan 16, 2018 7:05 am

monitoring hosts using ssh - can you change default account?

Post by paulconca »

Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =6&t=45292

In the future, please create a new thread and link to the old one instead of adding on.


Same question :!:

All the server we need to monitor already have an account and keys (not Nagios).

Is it possible use a different account on the Nagios Monitoring server to SSH to the client servers?

Thank you
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: monitoring hosts using ssh - can you change default acco

Post by dwhitfield »

Yep:

Code: Select all

./check_by_ssh --help
check_by_ssh v2.2.1 (nagios-plugins 2.2.1)

....

 -l, --logname=USERNAME
    SSH user name on remote host [optional]

....
paulconca
Posts: 31
Joined: Tue Jan 16, 2018 7:05 am

Re: monitoring hosts using ssh - can you change default acco

Post by paulconca »

Thank you

I am presuming you need a private key for the non-Nagios account?

If yes, where do you put that key?

Regards
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: monitoring hosts using ssh - can you change default acco

Post by dwhitfield »

You'll just need to follow https://assets.nagios.com/downloads/nag ... ng_SSH.pdf but use a different account than nagios.
Locked