Community discussions

MikroTik App
Topic Author
Posts: 27
Joined: Wed Feb 08, 2017 10:18 pm
Location: Germany

SSH-EXEC not working on ROS v7.9

Fri May 12, 2023 12:07 pm

I am not sure if it is indeed a bug or i am doing something wrong. So I explain the steps I did.
  • Created the SSH key from the CHR which will be connecting to the other Mikrotiks via Local (LAN) / Wireguard (no filters)
  • Imported the Private key in the CHR (/user/ssh-keys/private/ import user=$SystemUsername private-key-file=$PrivateKey)
  • Imported the Public key in the other Mikrotiks /user/ssh-keys/ import user=$SystemUsername public-key-file=$PublicKey)

Now when I SSH using /system/ssh address= user=XXXXXXXX it connects to the other Mikrotik. I have checked the log of the target Mikrotik and there was successfull attempt of the SSH connection.


When I try SSH-EXEC using :put ([/system ssh-exec address= user=CongitiveSystems command=":put ([:len [/ip/hotspot/active/ find]])" as-value]->"output") it reports back as failure: authentication failure. I have checked the log of the target Mikrotik and there was no attempt of the SSH connection even.

Can anyone confirm me if it is a bug or I did any mistake? Thank you

Who is online

Users browsing this forum: ajgnet, alozanox, Bing [Bot], stakado and 46 guests