Alpine LXC container's lack of ssh causes problems for automated installation

illegitimate-egg

New Member
May 25, 2025
1
0
1
Because Alpine's container doesn't ship with openssh, or configure it, it's difficult/impossible to use under automated conditions like under Ansible. When doing it by hand it's not such a big issue. Unfortunately, there's no easy way (I can find at least) that Ansible can login through the serial terminal and bootstrap SSH for later operations.

Other LXC images like Debian ship with sshd as an enabled service out of the box which makes it confusing why Alpine doesn't. It makes the pubkey parameter in the Ansible module somewhat redundant as whatever hook you have to run to install ssh could also do this
 
I built my own Alpine image with my own packages to have a working SSH setup. The default images are more a base image, which needs to be customized to have a streamlined automation experience.