When provisioning a new IBMi PowerVSI under a PowerVC workspace, and entering a cloud-init script containing runcmd, the VSI request fails with a 403 error: Response not successful: Received status code 403.
See example script below aimed at enabling SSH access for QSECOFR:
#cloud-config
users:
- name: qsecofr
ssh_authorized_keys:
- ssh-rsa AAAAB3N...Much.longer. key.TrX7B
runcmd:
- sed -i 's/^#PermitRootLogin.*/PermitRootLogin yes/' /QOpenSys/etc/ssh/sshd_config
- sed -i 's/^#PublicKeyAuthentication.*/PublicKeyAuthentication yes/' /QOpenSys/etc/ssh/sshd_config
- system 'ENDTCPSVR SERVER(*SSHD)'
- system 'STRTCPSVR SERVER(*SSHD)'
- system 'CHGUSRPRF USRPRF(QSECOFR) STATUS(*ENABLED)'
- system 'ENDTCPSVR SERVER(*SSHD)'
- system 'STRTCPSVR SERVER(*SSHD)'
Feels safe to assume that IBM Cloud would be the primary place to utilise cloud-init. And if it does not support runcmd, then it belittles the usefulness.
When provisioning a new IBMi PowerVSI under a PowerVC workspace, and entering a
cloud-init
script containingruncmd
, the VSI request fails with a 403 error: Response not successful: Received status code 403.See example script below aimed at enabling SSH access for
QSECOFR
:Feels safe to assume that IBM Cloud would be the primary place to utilise
cloud-init
. And if it does not supportruncmd
, then it belittles the usefulness.