From dd62483e5a4da17e425a57412bcfa24a1079cfad Mon Sep 17 00:00:00 2001 From: Marco D'Agostini Date: Wed, 30 Sep 2020 19:39:52 -0500 Subject: [PATCH] New: Configure ssh-keys in Mikrotik --- Configure ssh keys in Mikrotik.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Configure ssh keys in Mikrotik.md diff --git a/Configure ssh keys in Mikrotik.md b/Configure ssh keys in Mikrotik.md new file mode 100644 index 0000000..a736ea7 --- /dev/null +++ b/Configure ssh keys in Mikrotik.md @@ -0,0 +1,20 @@ +--- +tags: tutorial, network, mikrotik, ssh, security +--- + +# 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