mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-31 08:14:29 +02:00
mod/ssh-keys-import: support ed25519 keys...
... with RouterOS 7.12beta1
This commit is contained in:
parent
413be6f504
commit
ad6825571d
2 changed files with 8 additions and 2 deletions
|
@ -50,6 +50,7 @@
|
|||
:global EitherOr;
|
||||
:global LogPrintExit2;
|
||||
:global ParseKeyValueStore;
|
||||
:global RequiredRouterOS;
|
||||
:global SSHKeysImport;
|
||||
|
||||
:if ([ :len $FileName ] = 0 || [ :len $User ] = 0) do={
|
||||
|
@ -67,7 +68,7 @@
|
|||
:local Line [ :pick $Keys 0 [ :find $Keys "\n" ] ];
|
||||
:set Keys [ :pick $Keys ([ :find $Keys "\n" ] + 1) [ :len $Keys ] ];
|
||||
:local Type [ :pick $Line 0 [ :find $Line " " ] ];
|
||||
:if ($Type = "ssh-rsa") do={
|
||||
:if (([ $RequiredRouterOS $0 "7.12beta1" ] = true && $Type = "ssh-ed25519") || $Type = "ssh-rsa") do={
|
||||
$SSHKeysImport $Line $User;
|
||||
:set Continue true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue