I just spinned up a new LXD unprivileged container(CentOS 7) on a Proxmox 4.4 host. And immediately created a new user to avoid using the root user. The case is evey time I try to SSH into the container with the new user I get the error message Connection to 10.0.2.142 closed. I the message comes after the user have been accepted [daniel@Dell-XPS ~]$ ssh daniel@10.0.2.142daniel@10.0.2.142's password: Last login: Tue Feb 21 19:24:12 2017 from dell-xps.homeConnection to 10.0.2.142 closed.[daniel@Dell-XPS ~]$ I've added the user to /etc/ssh/sshd_config AllowedUsers daniel rootHowever the root user can login through SSH without any problems.Here is a paste of my /var/log/secureFeb 21 19:41:20 MariaDB sshd[701]: Accepted password for daniel from 10.0.1.141 port 49680 ssh2Feb 21 19:41:20 MariaDB sshd[701]: pam_loginuid(sshd:session): Cannot open /proc/self/loginuid: Permission deniedFeb 21 19:41:20 MariaDB sshd[701]: pam_loginuid(sshd:session): set_loginuid failedFeb 21 19:41:20 MariaDB sshd[701]: pam_unix(sshd:session): session opened for user daniel by (uid=0)Feb 21 19:41:20 MariaDB sshd[701]: error: PAM: pam_open_session(): Cannot make/remove an entry for the specified sessionFeb 21 19:41:20 MariaDB sshd[703]: Received disconnect from 10.0.1.141: 11: disconnected by userI tried to uncomment session required pam_loginuid.so in /etc/pam.d/sshd which fixed the error and let me login with my new user through SSH. But I'm pretty sure this isn't the recommended way!
Can't login through SSH with new user (Connection to 10.0.2.142 closed.)
centos;ssh