How to enable SSH public key authentication on Teltonika RUTX/TRB series

First, generate a SSH key:

ssh-keygen -t ed25519 -f id_teltonika.pub

Now copy the content of id_teltonika.pub which should look like this:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICfPyvgFaANpm+vjEcbQSHkmXe27DqLanlB++5+muI7H uli@uli-desktop

and open the Teltonika web interface and open System -> Administration -> Access Control

On that page, set Enable key-based authentication  to On. Furthermore, paste the content of id_teltonika.pub into the Public Keys field.

After that remember to click Save & Apply at the bottom of the page!

Now you can login using the public key, e.g.:

ssh -i id_teltonika [email protected]