Created
February 29, 2024 22:44
-
-
Save Scorcerer/ce14ef343af7a4120bdf3682cf8de8a0 to your computer and use it in GitHub Desktop.
One-liner to deploy a SSH key for your user in MikroTik RouterOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # All credits go to https://superuser.com/questions/1670773/how-can-i-add-my-ssh-public-key-to-a-mikrotik-router-device-using-the-command-li | |
| ssh destination "/file print file=mykey; file set mykey contents=\"`cat ~/.ssh/id_rsa.pub`\";/user ssh-keys import public-key-file=mykey.txt;/ip ssh set always-allow-password-login=yes" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment