routeros-scripts/ssh-keys-import

12 lines
415 B
Text
Raw Normal View History

#!rsc by RouterOS
2018-07-05 13:29:26 +00:00
# RouterOS script: ssh-keys-import
2021-01-01 20:33:52 +00:00
# Copyright (c) 2013-2021 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
2018-07-05 13:29:26 +00:00
#
# import ssh keys from file
2020-03-27 20:50:53 +00:00
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ssh-keys-import.md
2018-07-05 13:29:26 +00:00
2020-03-27 20:50:53 +00:00
:foreach Key in=[ / file find where type="ssh key" ] do={
/ user ssh-key import user=admin public-key-file=[ / file get $Key name ];
}