Community discussions

MikroTik App
 
TedjeVanEs
just joined
Topic Author
Posts: 20
Joined: Mon Jan 26, 2015 10:14 pm
Location: Aruba

Pasting script into Winbox / ssh terminal

Tue Jan 27, 2015 6:54 pm

I've been reading about Dynamic DNS scripts on the forum, so I wanted to test it. But when I try to past a script into Winbox or ssh terminal, it does not seem to work:
[admin@MikroTik] > /system scriptadd name=ddns policy=\
syntax error (line 1 column 35)
[admin@MikroTik] > <pre>ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
expected command name (line 1 column 1)
[admin@MikroTik] > source="# HomingBeacon Main Dynamic DNS Update Script\r\
syntax error (line 1 column 7)
[admin@MikroTik] > \n# Written by Sam Norris, ChangeIP.com\r\
expected command name (line 1 column 1)
[admin@MikroTik] > \n# 20100728 Tested on RouterOS 4.9\r\
expected command name (line 1 column 1)
....
What I am doing wrong, or has this functionality changed?
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Pasting script into Winbox / ssh terminal

Wed Jan 28, 2015 12:06 pm

You are missing a <space> on the first line, /system script add

Also do not use CTRL+V shortcut for pasting, it will give you some weird auto-complete function.
 
TedjeVanEs
just joined
Topic Author
Posts: 20
Joined: Mon Jan 26, 2015 10:14 pm
Location: Aruba

Re: Pasting script into Winbox / ssh terminal

Wed Jan 28, 2015 5:41 pm

Thanks! I added the space. Then I got some new errors, so I edited the policy line, to reflect the options my RB has. And after that adjusted some of the quote chars. Now the script shows up in Winbox - System - Scripts. And when I run it, I even see some new entries in the logs.
Onwards ho! Now I have to get Dynamic DNS working, next step: port mapping for remote ssh access to my little server :D
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Pasting script into Winbox / ssh terminal

Wed Jan 28, 2015 7:57 pm

I've been reading about Dynamic DNS scripts on the forum, so I wanted to test it. But when I try to past a script into Winbox or ssh terminal, it does not seem to work:
[admin@MikroTik] > /system scriptadd name=ddns policy=\
syntax error (line 1 column 35)
[admin@MikroTik] > <pre>ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
expected command name (line 1 column 1)
[admin@MikroTik] > source="# HomingBeacon Main Dynamic DNS Update Script\r\
syntax error (line 1 column 7)
[admin@MikroTik] > \n# Written by Sam Norris, ChangeIP.com\r\
expected command name (line 1 column 1)
[admin@MikroTik] > \n# 20100728 Tested on RouterOS 4.9\r\
expected command name (line 1 column 1)
....
What I am doing wrong, or has this functionality changed?

I think there is no need to use this scripts anymore. use:
IP/ Cloud

Unless you can't upgrade to v.6
 
TedjeVanEs
just joined
Topic Author
Posts: 20
Joined: Mon Jan 26, 2015 10:14 pm
Location: Aruba

Re: Pasting script into Winbox / ssh terminal

Thu Jan 29, 2015 8:36 pm

Unless you can't upgrade to v.6
Nope, no IP6 here as far as I know.
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Pasting script into Winbox / ssh terminal

Sun Feb 01, 2015 10:36 pm

Unless you can't upgrade to v.6
Nope, no IP6 here as far as I know.
Hossain2094a ment RouterOS version 6, not ip