diff options
author | Christian Hesse <mail@eworm.de> | 2018-07-05 15:29:26 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-07-05 15:34:08 +0200 |
commit | e1f134ead584c7b2e9ed406f5520d7f1a23294aa (patch) | |
tree | 929660280fb0acc183401d7e59a40f1cd7e8992c /ssh-keys-import | |
parent | 1d99dc38ff1f583d6e46adc5d1ba3455114d53c1 (diff) |
add scripts
Diffstat (limited to 'ssh-keys-import')
-rw-r--r-- | ssh-keys-import | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ssh-keys-import b/ssh-keys-import new file mode 100644 index 0000000..56ba6a4 --- /dev/null +++ b/ssh-keys-import @@ -0,0 +1,10 @@ +# RouterOS script: ssh-keys-import +# Copyright (c) 2013-2018 Christian Hesse <mail@eworm.de> +# +# import ssh keys from file + +# Split files with several keys from a shell... +# while read type key name; do echo $type $key $name > $name.pub; done < keys.pub +# ... then transfer with scp/sftp. + +:foreach key in=[ / file find where type="ssh key" ] do={ / user ssh-key import user=admin public-key-file=[ / file get $key name ]; } |