On 3/18/20 10:42, Alexander E. Patrakov wrote:
On Wed, Mar 18, 2020 at 7:29 PM Philip Rhoades <phil@pricom.com.au> wrote:
I realise that ssh'ing into a remote container does not fit with the conceptual framework of how containers are supposed to work but if I can get it to work, I am prepared to break with convention . . This is only a convention. For LXC, nobody would blame you for connecting to your container via ssh, in fact they encourage you to do so. And I would imagine that it is a valid and natural option for any container that runs systemd inside.
Sure, but I would say that is closer to a VM. You can enable the sshd daemon within the container if you want, or you could just setup an account for the user to ssh to on your host and then setup sudo to run podman exec to enter the container. If you want to setup sshd to get into the container, then you need to pick a port on the host for sshd to listen on. And map port 22 from the container to a different port on the host, and then have the remote user ssh to the external port.