Hello list,<br><br>I've got a situation where I can't create 'nagios' users on the systems I need to monitor; I'm stuck with using a set of different user names to monitor a range of systems.<br><br>For the sake of the discussion, assume the account on the Nagios server is 'nagios' and the account I've been given on the remote server I need to monitor is 'monitoruser'.<br>
<br>In trying to setup a check_by_ssh script, I'm at the point where I can do either of these successfully<br>- from the 'nagios' user on the Nagios server, I can run /usr/lib/nagios/plugins/check_by_ssh -H REMOTEHOST -l monitoruser -C "nagios-test-script'.  This runs fine, but I get prompted for monitoruser's password on the remote system.  Obviously I can't enter the password when this command is running from within Nagios<br>
- from a shell logged in as 'monitoruser' on the Nagios server, I can run the identical command and I don't get prompted for the password; everything works as I'd like, except that I need to be running the command from the 'monitoruser' account on the Nagios server (and I want to run the command from the 'nagios' user instead).  The fact that this works without a password prompt tells me that I've got monitoruser's ssh public key set up on REMOTEHOST<br>
<br>If I'm logged in as 'nagios' and try to run /usr/lib/nagios/plugins/check_by_ssh -H REMOTEHOST -i /home/monitoruser/.ssh/id_dsa -C "nagios-test-script" -vvvv, I get "warning: Identity file /home/monitoruser/.ssh/id_dsa not accessible: Permission denied.", which is what I'd expect.  This fails because the user 'nagios' can't access the ~/.ssh/id_dsa file of monitoruser; this is correct behaviour from a security perspective.<br>
<br>How can I use check_by_ssh to monitor remote servers, when the username on the remote box is different from the Nagios user name?<br><br>Thanks in advance<br><br>Dave M.<br>