Dude notifications, execute on server, ssh

Created new notification in Dude (6.42.7), set it’s type to “execute on server” and I’m trying to use ssh to connect to linux box and run a command.

In notification command window I have command:
/system ssh address=a.b.c.d user=xxx command=“/bin/command/here”

I’ve set up ssh keys; when connecting to Dude with winbox and running same command from terminal, it works perfectly.
Clicking ‘Test’ in notification window yields nothing. If I start remote host’s ssh in debugging mode, I see that there’s no incoming
connection (when clicking ‘Test’). ‘/tool fetch’ in command window works.

What am I doing wrong?

Did you ever find the solution to this?
I have the same issue now 3 years later!

Leads me to think that perhaps Dude does not actually use the same key as the underlying RouterOS.
Anyone else tried this?

Sadly, no.

if you have doubts about the keyfile used by the ssh command you could try to specify the name on the commandline …

For non-interactive session use ssh-exec

/system ssh-exec address=127.0.0.1 port=22  user=admin src-address=127.0.0.1 command="/print" output-to-file=file.txt

We solved this by run script on ROS from Dude, and script can then SSH to the remote server and execute required commands. We also can pass variables from Dude to the script.

Dude

# Define Subject
:global notificationtext "Service [Probe.Name] on [Device.Name] is now [Service.Status]"

# Run script
system script run sms

ROS script

# Define subject
:global notificationtext "$notificationtext"

# Define IP of ROS with SMS access
:local rossms "192.168.64.4"

# Firstname Lastname
:local phonenumber "+xxxxxxxxxxx"

# Send SMS
system ssh-exec address="rossms" user=sms-sender command="/tool sms send usb1 \"$phonenumber\" message=\"$notificationtext\""

More detailed description can be found in the topic - Dude v6 - SMS notification through another ROS - using ssh-exec.

We also got a confirmation from support - ‘Private key is not supported in dude’ and created a Feature request - Add Dude access to SSH private keys for ssh-exec.