Hi,
I need to use a ssh key with a password for my agent connections to my servers.
1. Where can I set a password for my nagios ssh user?
2. How can I change the default user names used for the nagios checks?
Thanks all!!
N
check_by_ssh Username and Password
Re: check_by_ssh Username and Password
1.) Are you asking how to set a Linux password for a user? Or how to define the password to use with check_by_ssh? Setting a password for a user is done with the "passwd <username>" command, and you should be able to define the password in the form of "user:pass@address"
2.) You would need to configure and compile nagios with the appropriate flags as explained in this nagios installation guide:
2.) You would need to configure and compile nagios with the appropriate flags as explained in this nagios installation guide:
Run the configure script to initialize variables and create a Makefile as follows...(the last two options: --with-command-xxx are optional, but needed if you want to issue external commands)
./configure --prefix=prefix --with-cgiurl=cgiurl --with-htmurl=htmurl --with-nagios-user=someuser --with-nagios-group=somegroup --with-command-group=cmdgroup
- Replace prefix with the installation directory that you created in the step above (default is /usr/local/nagios)
- Replace cgiurl with the actual url you will be using to access the CGIs (default is /nagios/cgi-bin). Do NOT append a slash at the end of the url.
- Replace htmurl with the actual url you will be using to access the HTML for the main interface and documentation (default is /nagios/)
- Replace someuser with the name of a user on your system that will be used for setting permissions on the installed files (default is nagios)
- Replace somegroup with the name of a group on your system that will be used for setting permissions on the installed files (default is nagios)
- Replace cmdgroup with the name of the group running the web server (default is nagios, in the example above it was nagcmd). This will allow group members (i.e. your web server) to be able to submit external commands to Nagios.
Former Nagios employee
Re: check_by_ssh Username and Password
1.) Are you asking how to set a Linux password for a user? Or how to define the password to use with check_by_ssh?
No, I have adding the ssh user already.
Where do I define the passwd command, in the command.cfg?
For example I'm trying to run the check_disk command remotely.
How would I define this command for example for use for a ssh password.
Thanks again!
N
No, I have adding the ssh user already.
Where do I define the passwd command, in the command.cfg?
For example I'm trying to run the check_disk command remotely.
How would I define this command for example for use for a ssh password.
Thanks again!
N
Re: check_by_ssh Username and Password
check_by_ssh requires keys.
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.
"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.
Re: check_by_ssh Username and Password
Hi,
I'm trying to use a ssh key with a password.
How do I set a password for use with a ssh key when using check_by_ssh?
Thanks
N
I'm trying to use a ssh key with a password.
How do I set a password for use with a ssh key when using check_by_ssh?
Thanks
N
Re: check_by_ssh Username and Password
You really cannot. You may be able to use an expect script, but usually check_by_ssh is only used with passwordless keys through ssh.
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.
"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.