From cdb12a374cbf23ff554686768a6b329e497fca75 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 21 Jan 2017 18:02:04 +0100 Subject: [PATCH] Added ssh_config pubkey restriction --- clone/clone | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clone/clone b/clone/clone index cf57446..84edeff 100755 --- a/clone/clone +++ b/clone/clone @@ -85,7 +85,7 @@ step3(){ test $confirm_burn != "y" && echo "<<< aborting" && exit; # (2) Burning image into disk # - sudo dd if=./original.img of=$DEV bs=4M || $( echo "<<< error: dd command failed" && exit ); + sudo dd if=./original.img of=$DEV bs=4M status=progress || $( echo "<<< error: dd command failed" && exit ); echo "<<< done"; @@ -204,6 +204,10 @@ step7(){ sudo chown -R 666:666 /mnt/home/sats-user/.ssh/; sudo chmod 400 /mnt/home/sats-user/.ssh/*; + # (7) Restrict access to pubkey only (no password) # + echo " (.) Restrict access to pubkey"; + echo "\nAllowGroups\tssh-key\nPasswordAuthentication\tno" | sudo tee -a /mnt/etc/ssh/ssh_config > /dev/null; + echo "<<< done";