How to import SSH key to MikroTik RouterOS for passwordless login
Important: You can not use elliptic curve keys (tested with ed25519) as of RouterOS 7.9 - RSA keys will work!
First, upload the public key to the filesystem of the router using Files - in the following image, the SSH key is listed at the bottom:

Using the terminal:
import_ssh_key.rsc
/user/ssh-keys/import user=admin public-key-file=id_mikrotik.pubUsing WebFig or WinBox:
Now go to System -> Users, open the SSH keys tab:

There, click Import SSH Key
open the user you want to add the public key for (typically admin if you didn’t create other users before):
then click Import SSH Key and the key will be active immediately
Check out similar posts by category:
MikroTik, Networking
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow