Neighbor connection with Terminal

Hi there;
i have automation project and i am new at scripting. i wanna connect other device with terminal
in terminal
i used
tool romon mac-telnet mac-adress
user
password
it works but when i entered tis code to script area it doesnt work.

How can i do this?

thanx for your help

stunts like that will not work with user/password-authentication (there is no unattended remote-shell usage which needs interaction for authentication - security-reasons)
you need to setup key-authentication between the devices
then you can use … :
.

[admin@tikki] > system ssh-exec 

<address> -- 
<command> -- 
as-value -- 
output-to-file -- write output to file instead of 'output' variable
port -- 
routing-table -- 
src-address -- 
user --

.
https://wiki.mikrotik.com/wiki/Use_SSH_to_execute_commands_(DSA_key_login)

@cumhureren, what error message do you get?

the script just fails …
.
it’s a nice “try just at home example” :open_mouth:

make yourself acquainted with ssh-key authenticaton !
.
BUT of course you can try ! … the youngest day … ? … is public !