I created a new user to read the mikrotik configuration that will login with public key authentication with a command like this (I’m on 17.2.1 so I can use the ed25519 keys):
/user add name=USERNAME group=read password=PASSWORD
/user ssh-keys import public-key-file=pubkey.pub user=USERNAME
There are two issues with this command that I haven’t been able to find in the documentation:
- Can I create a user without password login (only public key auth)?
- On the first login I have to change the password, is that avoidable on user creation?