I am trying to check if a remote process is running in a remote machine using the check_by_ssh plugin.

SSH is configured and I can connect without password with user shinken. Even more, the command works perfectly when run directly from command line:

Code:
su shinken -c '/usr/lib/nagios/plugins/check_by_ssh -H remote_address -u shinken -i ~shinken/.ssh/id_rsa -C "/usr/lib/nagios/plugins/check_procs -c 1:1 -C MyProcess"'
PROCS OK: 1 process with command name 'MyProcess'
However, when run as a command by shinken, it fails with:

Code:
UNKNOWN - check_by_ssh: Remote command '/usr/lib/nagios/plugins/check_procs -c 1:1 -C MyProcess' returned status 255
My command definition is as follows:

Code:
define command {
    command_name   check_ssh_MyProcess
    command_line   /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ -p $_HOSTSSH_PORT$ -u shinken -i ~shinken/.ssh/id_rsa -C "/usr/lib/nagios/plugins/check_procs -c 1:1 -C MyProcess" -E
}
Seems to be a permissions problem, but after so much reading, I don't know what could be wrong. Any ideas?