SSH from scheduler

Hi! Is there any way to establish a SSH connection from a scheduler?
Thank you.

Yes, but only if:

  1. You want to run exactly one command from it
  2. The username and password on the remote system is the same as the username and password on the router.

For that, use

/system ssh address="???.???.???.???" command="/log info \"testing...\"";

(replacing the command of course; don’t forget to escape quotes)


If that’s not suitable for you, you could instead send an HTTP request to a 3rd device. The 3rd device could then be programmed to make an SSH connection to your target device whenever it gets that HTTP request.

To send an HTTP request, you could use

/tool fetch url="http://example.com/"

Thank you for your reply, but I didn’t solve the problem.
This is my scheduler script:

/system scheduler add name=“sScan” policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive
on-event=“:delay 40s; /system ssh address=127.0.0.1 port=22 command="/interface wireless scan wlan1 duration=8s" output-to-file=scan.txt” interval=0 start-time=startup

The run count is set to 1 but i can’t see the file scan.txt