arch-maride-flavour/flavours/ssh.flavour/install.sh

15 lines
459 B
Bash
Raw Normal View History

2017-09-19 11:49:02 +00:00
#!/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