Community discussions

MikroTik App
 
auxmtik
just joined
Topic Author
Posts: 11
Joined: Fri Nov 11, 2022 11:31 am

Alternative to executing SSH in Netwatch

Mon Nov 21, 2022 8:52 pm

Good afternoon,

I have recently set up a Mikrotik device (PowerBox) with MIPSBE architecture (stable version 7.6). In said device, I attempted to configure the system utility "NetWatch" so that when a Mikrotik client -with the default IP 192.168.88.1- connects to it, it executes a SSH command. The purpose of this SSH command is to connect to the machine being plugged to the PowerBox and, subsequently, execute a certain command which configures a system package (in the connected device). Something to be mentioned at this point is that the client does not have a password, so the SSH can be accomplished with no human interaction whatsoever. I tried to execute the command in the RouterOS terminal, and the command works perfectly -- the package is configured successfully.

However, just as other users have hinted in this forum, the SSH command does not work outside the terminal. Consequently, the execution of the SSH command cannot be done by NetWatch. I was therefore wondering is there is a way to accomplish this objective, as I need to connect to the machine to execute a certain command. Is there any alternative to using SSH in this context?

Thank you very much for your attention.
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Alternative to executing SSH in Netwatch

Mon Nov 21, 2022 9:17 pm

It seems similar to this:

viewtopic.php?t=164784

Workaround at the end, while not exactly pretty, may be good enough for you too.
 
auxmtik
just joined
Topic Author
Posts: 11
Joined: Fri Nov 11, 2022 11:31 am

Re: Alternative to executing SSH in Netwatch

Tue Nov 22, 2022 9:41 am

Hi, Sob, thank you very much for the answer and for the link.

In this case, I cannot apply said workaround since the clients I am working with do not rely on private/public keys for automated login. Instead, the clients do not have a password configured so that the SSH can be done directly.

Who is online

Users browsing this forum: Bing [Bot], lurker888 and 64 guests