[firstname.lastname@example.org ~]$ ssh email@example.com
Authorized uses only. All activity may be monitored and reported.
Last login: Tue Jun 2 14:11:10 2020 from 10.10.10.20
So, you can connect to the client machine from the master as user “icinga” on
/usr/lib64/nagios/plugins/check_by_ssh -v -H 10.10.10.10 -l user-i id_rsa
-C “/usr/lib64/nagios/plugins/check_users -w 0 -c 2”
However that tells me that you’re connecting as user “user-i”, or (I strongly
suspect that lack of a space is a typo) you mean you’re conecting as user
“user” and providing the SSH key “id_rsa”.
Firstly that “user” should be “icinga” and secondly the SSH key parameter
should point to a fully-qualified path such as /home/icinga/…ssh/id_rsa
On the other hand the string “Remote command execution failed: Authorized uses
only. All activity may be monitored and reported.” is not an error message.
It’s simply the greeting banner you get when you successfully connect, so it’s
entirely possible that your problem is actually that you’re connecting by SSH
but then not running the command you wanted to.
What happens if you SSH to the machine as user icinga (as you demonstrate
above) and then run the command:
/usr/lib64/nagios/plugins/check_users -w 0 -c 2