knowledge/Configure ssh keys in Mikrotik.md
Marco D'Agostini 95782bbca6 Added missing tag header to some documents
Added `english` / `spanish` tags and added `english` tag to template
2021-02-24 17:10:55 +01:00

21 lines
680 B
Markdown

---
tags: tutorial, network, mikrotik, ssh, security, english
---
# Configure ssh keys in Mikrotik
```mikrotik
# Create a dummy file
/file print file=dummyFile
# Set its content to the public key
/file set dummyFile.txt contents="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7QEcjRkbBWpwE7zIShobue9aEGyVObVHDLhK"
# Assign public key to user
/user ssh-keys import public-key-file=dummyFile.txt user=admin
```
Change the *public key*, and *user* accordingly
## What led to learning this
After having troubles with a mikrotik router I had to reconfigure it from scratch (didn't have a backup :sad:), and in the process the router got hacked, which pushed me to improve security measures