Search code examples
sshlxc

Connecting to lxc container via SSH using lxc user


I noticed that the username/password I use to connect to a newly created LXC container via lxc-console doesn't work with ssh (with sshd running in the container). When I try, I get Permission denied Why is that, and how can I make it work?


Solution

  • inside container, open /etc/ssh/sshd_config and change PermitRootLogin to yes.

    # Authentication:
    LoginGraceTime 120
    PermitRootLogin yes
    StrictModes yes