Vasyl Saienko | 9740a4f | 2023-09-22 14:48:29 +0000 | [diff] [blame] | 1 | #cloud-config |
2 | debug: True | ||||
3 | ssh_pwauth: True | ||||
4 | disable_root: false | ||||
5 | chpasswd: | ||||
6 | list: | | ||||
7 | root:r00tme | ||||
8 | expire: False | ||||
9 | output: {all: '| tee -a /var/log/cloud-init-output.log'} | ||||
10 | runcmd: | ||||
11 | - sed -i'.orig' -e's/\#PermitRootLogin.*/PermitRootLogin yes/g' -e's/PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config | ||||
12 | - service sshd restart | ||||
13 | - sed -i'.orig' -e's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config |