Docker Community Forums

Share and learn in the Docker community.

[Digital Ocean] How to disable openssh-server because my container is an ssh server itself? "failed to create endpoint on network bridge: listen tcp 0.0.0.0:22: bind: address already in use ERROR"


(Aerth) #1

Trying to launch this image, with 2022 exposed, binding to host port 22.

It is a ssh server itself.

The problem is, there is the real openssh-server listening on 22 already.

How to not use the default ssh server at all?

Here is the error:

Oops!

ERROR: mt-golang-1: Cannot start container 84867a84988bed0a41a26b531fe841101d6f8e5e41da7e7b12177261325dd943: failed to create endpoint mt-golang-1.ce8a4a49 on network bridge: listen tcp 0.0.0.0:22: bind: address already in use ERROR: Service Start action on ‘mt-golang’ (using ‘mtgolang/ssh2docker:latest’) has failed
Click here for more inform…


(Robertteamnow) #2

In Docker Cloud, I ran into this issue attempting to do a volume backup as documented here: https://docs.docker.com/docker-cloud/tutorials/download-volume-data/

It appears the node has an SSH server running already. I’m not sure if this is default behavior as it’s not well documented.

I was able to work around by publishing the port on 2222, but that’s not an ideal solution.

It would be great to see if others have this issue too.