You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that this line in the Dockerfile works:
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
However, for me the entry in the /etc/ssh/sshd_config file itself is still commented out (not sure if it's always a problem) and as a result still gets "access denied" when trying to SSH as root. i.e.:
I discovered that this line in the Dockerfile works:
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
However, for me the entry in the /etc/ssh/sshd_config file itself is still commented out (not sure if it's always a problem) and as a result still gets "access denied" when trying to SSH as root. i.e.:
An easy fix is to either update the existing
sed
command or add a secondsed
command such as:RUN sed -i 's/#PermitRootLogin/PermitRootLogin/' /etc/ssh/sshd_config
If the entry is not commented out, the secondary
sed
command has no effect. Then I was able to successfully SSH once the file looked like this:Mostly posting here in case anyone else runs into this. I will submit a PR if I get a chance. Thanks!
The text was updated successfully, but these errors were encountered: