|
Is there an option to make cloud-init not automatically enable ssh by default? |
Answered by
rjhornsby
Aug 29, 2025
Replies: 1 comment
|
I'm not sure why you'd want to disable sshd, but I don't know your environment. If you don't include the ssh cloud-init module, does it still enable sshd? For example, our main If that doesn't do the trick, is it possible that your image (before cloud-init gets to it) already has sshd enabled? There might be a better way, but the brute-force approach could be something like this: or maybe dropping a quick couple of line shell script into |
0 replies
Answer selected by
holmanb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure why you'd want to disable sshd, but I don't know your environment. If you don't include the ssh cloud-init module, does it still enable sshd? For example, our main
cloud.cfgfile that ensures sshd is enabled contains:If that doesn't do the trick, is it possible that your image (before cloud-init gets to it) already has sshd enabled?
There might be a better way, but the brute-force approach could be something like this: