SSH remote multiline commands

I am trying to autologin via SSH (DSA cert) and execute remote command.
Below script check its current public ip, if it has been changed and auto-log into another router with cert already installed and it should add changed ip address into firewall address lists.
It works fine except for ssh command for firewall address lists adding.
Maybe I did not escape command correctly or maybe mikrotik does not support this kind of command as wiki said https://wiki.mikrotik.com/wiki/Manual:System/SSH_client#Executing_remote_commands
Where am I going wrong?

:local ipadd [/ip firewall address-list get value-name=address number=0];
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt;
:local thisip [file get mypublicip.txt contents ];
/ip firewall address-list set address=$thisip list=publicadd numbers=0;
:if ($ipadd != $thisip) do={
	 /system ssh 192.168.1.1 command="ip firewall address-list set address=$thisip list=VOIP-EXT numbers=0";
	 set ipadd $thisip;
}

try global instead local

Tried
1)both global
2)$ipadd as global and $thisip as local
3) as 2 but viceversa

It does not work yet. :confused:

could it be a routeros version issue?
they are v6.36 and v6.38

no one?

Multiple instructions as a single line? Separate them with a semicolon:
/ip firewall nat; print terse where chain=$client-srcnat; add action=src-nat chain=$client-srcnat src-address=$framedipaddress to-address=$publicip comment=“$comment” place-before=0; add action=dst-nat chain=$client-dstnat dst-address=$publicip to-address=$framedipaddress comment=“$comment” place-before=0;

PS: You’ll need to get a relative reference to do ‘place-before’, we did a ‘print terse’ in the above example…