2020-09-18 11:00:27 +02:00
|
|
|
#!rsc by RouterOS
|
2018-07-05 15:29:26 +02:00
|
|
|
# RouterOS script: ssh-keys-import
|
2022-01-01 21:38:15 +01:00
|
|
|
# Copyright (c) 2013-2022 Christian Hesse <mail@eworm.de>
|
2020-06-19 22:17:42 +02:00
|
|
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
2018-07-05 15:29:26 +02:00
|
|
|
#
|
|
|
|
# import ssh keys from file
|
2020-03-27 21:50:53 +01:00
|
|
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ssh-keys-import.md
|
2018-07-05 15:29:26 +02:00
|
|
|
|
2022-05-10 16:16:30 +02: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 21:50:53 +01:00
|
|
|
}
|