2020-09-18 09:00:27 +00:00
|
|
|
#!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>
|
2020-06-19 20:17:42 +00:00
|
|
|
# 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
|
|
|
|
2022-05-10 14:16:30 +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
|
|
|
}
|