#cloud-config package_update: true package_upgrade: true packages: - curl - wget - git - vim - htop - unzip - software-properties-common - apt-transport-https - ca-certificates - gnupg - lsb-release # Create a new user users: - name: deploy sudo: ALL=(ALL) NOPASSWD:ALL shell: /bin/bash ssh_authorized_keys: - ssh-rsa YOUR_SSH_KEY_HERE # Disable root SSH login ssh_pwauth: false disable_root: true # Configure automatic security updates write_files: - path: /etc/apt/apt.conf.d/20auto-upgrades content: | APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; runcmd: - systemctl enable ssh - ufw --force enable - ufw allow ssh