I am trying to execute a script with ssh and get an interrupted message. Please help.
Here is the failed command ------------------------------------
root@jim:/# ssh admin-ssh@10.1.3.1 '/system script run 1'
status: connecting
interrupted
root@jim:/#
Here is the script printed in the same fashion as above - this works -------------
root@jim:/# ssh admin-ssh@10.1.3.1 '/system script print'
Flags: I - invalid
0 name="PastDueAccounts" owner="rampSiDe64"
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
last-started=nov/11/2010 11:39:43 run-count=16
source=
Generic IP address list input
Based on a script written by Sam Norris, ChangeIP.com 2008
Edited by Andrew Cox, AccessPlus.com.au 2008
:if ( [/file get [/file find name=PastDue.txt] size] > 0 ) do={
Remove exisiting addresses from the current Address list
/ip firewall address-list remove [/ip firewall address-list find list=PastDueAccounts]
:global content [/file get [/file find name=PastDue.txt] contents] ;
:global contentLen [ :len $content ] ;
:global lineEnd 0;
:global line "";
:global lastEnd 0;
:do {
:set lineEnd [:find $content ";" $lastEnd ] ;
:set line [:pick $content $lastEnd $lineEnd] ;
:set lastEnd ( $lineEnd + 1 ) ;
If the line doesn't start with a hash then process and add to the list
:if ( [:pick $line 0 1] != "#" ) do={
:local entry [:pick $line 0 ($lineEnd -1) ]
:if ( [:len $entry ] > 0 ) do={
/ip firewall address-list add list=PastDueAccounts address=$entry
}
}
} while ($lineEnd < $contentLen)
}
1 name="getips" owner="rampSiDe64"
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
last-started=nov/11/2010 13:24:36 run-count=32
source=
/tool fetch address=192.168.42.21 host=192.168.42.21 mode=http src-path=/aplus/PastDue.txt
:delay 10
#Replace with whatever name you have called the processing script
/system script run PastDueAccounts
/tool fetch address=192.168.42.21 host=192.168.42.21 mode=http src-path=/aplus/Disconnect.txt
:delay 10
/system script run DisconnectAccounts
/tool fetch address=192.168.42.21 host=192.168.42.21 mode=http src-path=/plus/NotifySubs.txt
:delay 10
/system script run NotifySubs
2 name="DisconnectAccounts" owner="rampSiDe64"
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
last-started=nov/11/2010 11:39:54 run-count=7
source=
Generic IP address list input
Based on a script written by Sam Norris, ChangeIP.com 2008
Edited by Andrew Cox, AccessPlus.com.au 2008
:if ( [/file get [/file find name=Disconnect.txt] size] > 0 ) do={
Remove exisiting addresses from the current Address list
/ip firewall address-list remove [/ip firewall address-list find list=DisconnectAccounts]
:global content [/file get [/file find name=Disconnect.txt] contents] ;
:global contentLen [ :len $content ] ;
:global lineEnd 0;
:global line "";
:global lastEnd 0;
:do {
:set lineEnd [:find $content ";" $lastEnd ] ;
:set line [:pick $content $lastEnd $lineEnd] ;
:set lastEnd ( $lineEnd + 1 ) ;
If the line doesn't start with a hash then process and add to the list
:if ( [:pick $line 0 1] != "#" ) do={
:local entry [:pick $line 0 ($lineEnd -1) ]
:if ( [:len $entry ] > 0 ) do={
/ip firewall address-list add list=DisconnectAccounts address=$entry
}
}
} while ($lineEnd < $contentLen)
}
3 name="NotifySubs" owner="rampSiDe64"
policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive
run-count=0 source=
Generic IP address list input
Based on a script written by Sam Norris, ChangeIP.com 2008
Edited by Andrew Cox, AccessPlus.com.au 2008
:if ( [/file get [/file find name=NotifySubs.txt] size] > 0 ) do={
Remove exisiting addresses from the current Address list
/ip firewall address-list remove [/ip firewall address=list find list=DisconnectAccounts]
:global content [/file get [/file find name=NotifySubs.txt] contents] ;
:global contentLen [ :len $content ] ;
:global lineEnd 0;
:global line "";
:global lastEnd 0;
:do {
:set lineEnd [:find $content ";" $lastEnd ] ;
:set line [:pick $content $lastEnd $lineEnd] ;
:set lastEnd ( $lineEnd + 1 ) ;
If the line doesn't start with a hash then process and add to the list
:if ( [:pick $line 0 1] != "#" ) do={
:local entry [:pick $line 0 ($lineEnd -1) ]
:if ( [:len $entry ] > 0 ) do={
/ip firewall address-list add list=NotifySubs address=$entry
}
}
} while ($lineEnd < $contentLen)
}
root@jim:/#