routeros-scripts/ssh-keys-import

12 lines
412 B
Text
Raw Normal View History

#!rsc by RouterOS
2018-07-05 13:29:26 +00:00
# RouterOS script: ssh-keys-import
2023-01-02 22:33:49 +00:00
# Copyright (c) 2013-2023 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
:foreach Key in=[ /file/find where type="ssh key" ] do={
/user/ssh-key/import user=admin public-key-file=[ /file/get $Key name ];
2020-03-27 20:50:53 +00:00
}