From 6754723fe029bf8ad0c5aec20be9f1e6cbcee6a3 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 10 May 2017 13:48:55 +0200 Subject: [PATCH] auto generate maintenance keys --- .gitignore | 5 ++++- clone/REAMDE.md | 5 +++-- clone/server/maintenance/generate.sh | 8 ++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 clone/server/maintenance/generate.sh diff --git a/.gitignore b/.gitignore index 345afb6..ca63d05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ *.img *.zip -/clone/server/** +/clone/server/created +/clone/server/authorized_keys +/clone/server/maintenance/* +!/clone/server/maintenance/generate.sh /clone/clone.conf diff --git a/clone/REAMDE.md b/clone/REAMDE.md index a087589..ac58c39 100644 --- a/clone/REAMDE.md +++ b/clone/REAMDE.md @@ -12,5 +12,6 @@ Note: _if you don't posess it, go to raspberry website and download debian lite. #### 2. Clone script -1. Launch `./clone {yoursddevice}` -2. Now start the raspi3 with it \ No newline at end of file +1. Launch `./server/maintenance/generate.sh` to generate maintenance keys +2. Launch `./clone {yoursddevice}` +3. Now start the raspi3 with it \ No newline at end of file diff --git a/clone/server/maintenance/generate.sh b/clone/server/maintenance/generate.sh new file mode 100644 index 0000000..ada3190 --- /dev/null +++ b/clone/server/maintenance/generate.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +for i in `seq 1 10`; do + + ssh-keygen -t ecdsa -b 521 -C "[ECDSA:521] maintenance$i" -f ./key$i -P "" 2> /dev/null > /dev/null; + +done; \ No newline at end of file