packer.sh 713 B

1234567891011121314151617181920
  1. #!/usr/bin/bash -x
  2. # re-secure ssh
  3. sed -i "/^#\?PasswordAuthentication/d" /etc/ssh/sshd_config
  4. sed -i "/^#\?PermitRootLogin/d" /etc/ssh/sshd_config
  5. echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
  6. echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
  7. # install VirtualBox Guest Additions
  8. # https://wiki.archlinux.org/index.php/VirtualBox
  9. pacman -S --noconfirm linux-headers virtualbox-guest-utils virtualbox-guest-modules-arch nfs-utils
  10. echo -e 'vboxguest\nvboxsf\nvboxvideo' > /etc/modules-load.d/virtualbox.conf
  11. # enable related virtualization and networking services
  12. systemctl enable vboxservice.service
  13. systemctl enable rpcbind.service
  14. # Clean the pacman cache to minify image
  15. yes | pacman -Scc
  16. sync