Restart SSH service in cloud-config

Hi all,

I’m writing the /etc/ssh/sshd_config file via cloud-config. Specifically, I’m setting some trusted CA keys to allow SSH via signed certificates. I’ve had no issue getting the file modified, however I noticed that after RancherOS boots, the changes in /etc/ssh/sshd_config are not implemented until I login and manually do a:

system-docker restart console

So I tried adding that into a run command in my cloud-config:


  • system-docker restart console

However, when I boot with the cloud-config RancherOS loads all the way up until it’s about to launch the console and then freezes.

Is there another way I can restart the SSH daemon to ensure my changes are reflected when it boots up?