Score:0

How can I build a Docker container with vulnerable root SSH?

fr flag

I'm trying to build a Docker container which is deliberately insecure - allowing login with root:password.

With this Dockerfile, I can log in as dingo.

FROM linuxserver/openssh-server

ENV PUID=1000
ENV PUID=1000
ENV PGID=1000
ENV TZ=Europe/London
ENV SUDO_ACCESS=false
ENV PASSWORD_ACCESS=true
ENV USER_NAME=dingo
ENV USER_PASSWORD=password

EXPOSE 2222

$ ssh dingo@localhost -p 2222 works.

But if I set ENV USER_NAME=root, even after I docker image rm [hash] -f the image and start over, it does not allow login with root:password; I get:

root@localhost's password:
Permission denied, please try again.

How can I make a Docker container which deliberately exposes SSH access with the login root:password?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.