I want to do something like that. Dude starts using putty and I connect via ssh to mikrotik by which I can send text messages. In “execute on server” I wrote something like this:
“putty user@ip-pw pass”
How can I now add the following command to have been made for the above machine:
/tool sms send usb2 “com” message = “xxxxx”
Please help me. How do I connect using “DUDE” via ssh with “MT” and execute any command on it?
Try to create batch file to send commands using ‘Plink.exe’ (it’s a part of PuTTY package).
http://the.earth.li/~sgtatham/putty/0.62/htmldoc/Chapter7.html#plink
HTH,
When I connect with plink now on Mikrotik information in the logs I get the following:
“plink -ssh user@ip -pw pass -s /tool”
“ssh error, unknown subsystem requsted”
You did it wrong way, read chapter ‘7.2.2 Using Plink for automated connections’ from mentioned documentation.
Proper way is:
plink.exe IP_address -ssh -l user_name -pw user_password your_commandThis works for me.
HTH,
Ok thanks, I did not check this.
But there was another problem. “Plink” in the sent messages will not tolerate spaces. I’d have to change all the names of the station: “station name” on “station_name”. Something else you can do about it?
Try to surround these names (or even whole command too) with double quotes
or use plink ‘-m’ switch to specify file containing all necessary commands.
HTH,
Sorry to awake a year old thread, but I thought it may be useful for others.
I have a gsm device connected with Mirkotik , and DUDE is installed on Windows base PC x86 (for send and receive purposes) , now i want to send dude sms notifications via mikrotik. download plink and use the following syntax.
c:\temp\plink.exe -ssh -l admin -pw YOURPASS 192.168.1.1 "/tool sms send phone-number=03333021909 usb3 message=[Probe.Name]_on_[Device.Name]_is_now__[Service.Status]"
Make sure yoru device name and message have no BLANK SPACES in it, thats why I used _ or -
It took me 3-4 hours just to figure out that spaces were not supported or create problems with or ().
hope this will help some one ![]()
Some reference:
http://aacable.wordpress.com/2013/11/02/mikrotik-dude-sms-notification/
Hello,
I’m having a small problem with getting some SMS, and it’s only recently.
Sometime plink will send a “not working” notification and later when the device returns, we don’t receive a “working” sms.
I’ve sent test SMSs and they’ve all worked with no problem. So far this issue has happened 3x in the last 2 days.
I haven’t changed any configs on DUDE, would this be a plink issue or something with dude? I can’t find anyhting in the forum or online about a similar issue…
any info is appreciated ![]()