yum install nagios on an Amazon Linux instance, and it created a nagios user with shell
/sbin/nologin and homedir
/var/spool/nagios. This is the behaviour on EC2.
I want to use
check_by_ssh running locally as user
nagios to execute a command on the remote host as some user, without typing in a password. So using
ssh-keygen seems logical, but how do I generate a public key for user
nagios if that user doesn't have a shell?
Is the answer to change the default shell (e.g. to bash) and perhaps the homedir of local user
nagios so I can generate the key, or is there another way?
- Question: Is it bad practice to allow the
nagiosuser to login?
- Question: Is it bad practice to change the homedir, e.g. to /home/nagios?
- Question: What is the recommended way of doing this?