> This requires files in ~/.ssh for the nagios user
Not exactly. You can (and should) run ssh with the -F option to specify a configfile that will point to files in other locations. Example :
ssh -F /var/lib/nagios/ssh_config ...
/etc/nagios/ssh_config: UserKnownHostsFile /var/lib/nagios/known_hosts IdentityFile /var/lib/nagios/id_rsa ...
nagios shouldn't have a "real" home folder.
Closing as invalid, feel free to reopen if the provided solution is not working.
> This requires files in ~/.ssh for the nagios user
Not exactly. You can (and should) run ssh with the -F option to specify a configfile that will point to files in other locations. Example :
ssh -F /var/lib/ nagios/ ssh_config ...
/etc/nagios/ ssh_config: nagios/ known_hosts nagios/ id_rsa
UserKnownHostsFile /var/lib/
IdentityFile /var/lib/
...
nagios shouldn't have a "real" home folder.
Closing as invalid, feel free to reopen if the provided solution is not working.