From bc13ac0712a0218fdee3d44e8df42fd7633f1dbe Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 19 Sep 2017 13:49:02 +0200 Subject: [PATCH] Add SSH as flavour --- flavours/ssh.flavour/install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 flavours/ssh.flavour/install.sh diff --git a/flavours/ssh.flavour/install.sh b/flavours/ssh.flavour/install.sh new file mode 100755 index 0000000..93d6c7f --- /dev/null +++ b/flavours/ssh.flavour/install.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +echo "~> Install openssh package" +pacstrap /mnt openssh + +echo "~> Patch /etc/ssh/sshd_config...:" +echo " * disallow passwords." +arch-chroot /mnt sed -i "s/^#PasswordAuthentication .*$/PasswordAuthentication no/g" /etc/ssh/sshd_config +echo " * force SSH keys." +arch-chroot /mnt sed -i "s/^#PubkeyAuthentication .*$/PubkeyAuthentication yes/g" /etc/ssh/sshd_config +echo " * enable on boot." +arch-chroot /mnt systemctl enable sshd + +amf_return=0