eurobsdcon22/provision-openbsd.sh

19 lines
558 B
Bash
Raw Permalink Normal View History

2022-09-14 12:56:21 +02:00
#!/bin/sh
set -e
set +x
(
2022-09-15 15:02:35 +02:00
echo Starting packer provisioning.
2022-09-14 12:56:21 +02:00
sysctl -n kern.version
printf 'permit nopass :wheel\n' > /etc/doas.conf
printf 'PasswordAuthentication yes\nPermitRootLogin yes\n' >> /etc/ssh/sshd_config
echo Cleaning SSH keys
rm -f /etc/ssh/ssh_host*
echo Cleaning caches
find /var/log -type f | while read f; do echo -ne '' > $f; done
find /tmp -type f | while read f; do echo -ne '' > $f; done
sync
sync
echo Packer provisionning done.
)
exit 0