Skip to content

Instantly share code, notes, and snippets.

@muhamad-ridwant-tech
Created September 17, 2025 06:54
Show Gist options
  • Select an option

  • Save muhamad-ridwant-tech/dcd4898deab916b61a252d622fd27a8f to your computer and use it in GitHub Desktop.

Select an option

Save muhamad-ridwant-tech/dcd4898deab916b61a252d622fd27a8f to your computer and use it in GitHub Desktop.
reset root password & allow user root ssh
#cloud-config
chpasswd:
list: |
root:ridwan
expire: false
ssh_pwauth: true
runcmd:
- sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
- systemctl restart sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment