Community discussions

MikroTik App
 
cumhureren
just joined
Topic Author
Posts: 5
Joined: Wed Jan 22, 2020 1:29 pm

Neighbor connection with Terminal

Wed May 20, 2020 1:06 pm

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
 
User avatar
floaty
Member Candidate
Member Candidate
Posts: 167
Joined: Sat Oct 20, 2018 1:24 am
Location: 52°08'32.34"N 14°39'05.0"E

Re: Neighbor connection with Terminal

Wed May 20, 2020 9:32 pm

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_ ... key_login)
~~
We know what happens to people who stay in the middle of the road. They get run over.
 
User avatar
mutluit
Member
Member
Posts: 421
Joined: Wed Mar 25, 2020 4:04 am

Re: Neighbor connection with Terminal

Thu May 21, 2020 12:56 am

@cumhureren, what error message do you get?
 
User avatar
floaty
Member Candidate
Member Candidate
Posts: 167
Joined: Sat Oct 20, 2018 1:24 am
Location: 52°08'32.34"N 14°39'05.0"E

Re: Neighbor connection with Terminal

Thu May 21, 2020 6:27 am

the script just fails ...
.
it's a nice "try just at home example" :shock:
~~
We know what happens to people who stay in the middle of the road. They get run over.
 
User avatar
floaty
Member Candidate
Member Candidate
Posts: 167
Joined: Sat Oct 20, 2018 1:24 am
Location: 52°08'32.34"N 14°39'05.0"E

Re: Neighbor connection with Terminal

Thu May 21, 2020 6:33 am

make yourself acquainted with ssh-key authenticaton !
.
BUT of course you can try ! ... the youngest day ... ? ... is public !
~~
We know what happens to people who stay in the middle of the road. They get run over.

Who is online

Users browsing this forum: No registered users and 30 guests