====== Connecting to Docker containers via SSH ====== To construct an Ubuntu-based Docker image ready for SSH access with basic password authentication, start by creating a Dockerfile. Add this content: apt update && apt install -y openssh-server sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config passwd root service ssh start