Container image has ssh issues
I am running GitLab in a container on Kubernetes. When I attempt to SSH into it, it shows the default ubuntu MOTD. This issue started on September 7th, and I am actually having trouble recreating outside of my environment. Once I run the fix below, it works just fine until the container restarts and thus everything resets to the broken state. I'm making the issue here since the Dockerfile is here.
Version:
# dpkg-query -W gitlab-ce
gitlab-ce 8.11.7-ce.0
Here is a relevant log entry showing the issue:
# tail -f /var/log/gitlab/sshd/current
2016-09-19_20:41:34.55747 PAM: pam_open_session(): Cannot make/remove an entry for the specified session
After some googling, I came across this solution that fixed it:
sed -ri 's/^session\s+required\s+pam_loginuid.so$/session optional pam_loginuid.so/' /etc/pam.d/sshd