I want to SSH into a directly into the bash of a docker image running on a Ubuntu VM. VM has public ip.
I want to SSH into this docker image from a remote machine. I have added the auth keys from my remote machine to my Ubuntu VM. And then started the docker image with bash on the VM with this command:
docker exec -it CONTAINER_ID bash
When I run SSH command from the remote machine as follows:
ssh -i path/to/private/key username_VM@ip_VM
I directly ssh into the Ubuntu VM but not into docker image. How to ssh directly into running docker image on the VM?