Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]构建的Docker开发容器无法使用root密码登录 #394

Closed
CHELO-NG opened this issue May 10, 2024 · 1 comment · Fixed by #395
Closed

[BUG]构建的Docker开发容器无法使用root密码登录 #394

CHELO-NG opened this issue May 10, 2024 · 1 comment · Fixed by #395
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@CHELO-NG
Copy link
Contributor

Bug描述
构建的Docker开发容器无法使用root密码登录

Pasted image 20240510095916

Bug分析

可能是sshd由于版本升级,增加了如下的默认配置,导致不允许root通过密码登录。

Pasted image 20240510100455

可以修改该配置允许root用户通过密码登录

PermitRootLogin yes

Bug解决方案

方案一:

在相关文档中增加相关问题的解决方案。

方案二:

修改docker/bin/starter-sshd.sh文件

if [ -f /etc/ssh/sshd_config ]; then
  echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
  service ssh restart
fi
@CHELO-NG CHELO-NG added the bug Something isn't working label May 10, 2024
@hnwyllmm
Copy link
Collaborator

感谢反馈,可以帮忙提个PR吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants