11

*ssh into server*
*runs 'sudo systemctl start docker'*
*ssh into server again*
> Permission denied

How docker? How are you destroying the ssh servers auth?

Comments
  • 1
    And this persists across restarts, as soon as I start the docker service I can't ssh into the server anymore.
  • 3
    Docker is so wickedly easy it even ignores your net config completely and just uses the ports it wants as it was a real machine.

    "Your way", you know, but like.. completely different.
  • 2
    Did you check if maybe some container runs on your SSH port?
  • 0
    @kolaente nope, it would be 80 and 443 and one port that's not exposed to the host
  • 0
    @kolaente also, there are not even containers running
  • 2
    Maybe docker added virtual networks over the docker0 bridge?

    Try "docker network ls" and look for any other entries then bridge, host or none. If you find any, then remove them with "docker network rm <id>".
  • 1
    @theKarlisK if the firewall completely blocks SSH, it would just time out on the client side though.. I'd take a look at the sshd_config for whether password auth got disabled (it should be, and you should use keys!!), whether the key (if any) is still present in authorized_keys for your remote user, and whether the password for that user suddenly changed if password auth is used (very unlikely, but might happen on shared servers every now and then).
  • 1
    @theKarlisK I've unfortunately got no experience with Docker (as I think that separation of services into a single host through Docker is quite perverse) but I doubt that it'd overlay system directories to its own content. That'd be completely ridiculous, equalling a whole system takeover. PAM or SSH lockout, most likely.

    Actually @succcubbus could you perhaps relay a (redacted) copy of the OS for analysis? I've got pretty interested in it. My email address would be <insert your username here>@nixmagic.com.
  • 0
    I am having a similar issue but apparently no ssh config that I have tried can solve it...
    I can login in local network but as soon as I use a dns to get to it, it won't login
Add Comment