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

What the purpose of this line? #1

Open
piyueh opened this issue Sep 8, 2020 · 0 comments
Open

What the purpose of this line? #1

piyueh opened this issue Sep 8, 2020 · 0 comments

Comments

@piyueh
Copy link
Member

piyueh commented Sep 8, 2020

This line does nothing:

sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \

The only place matching the pattern PermitRootLogin without-password in /etc/ssh/sshd_config is in a comment section, which does not affect the SSH daemon.

I guess the original intention is to modify the setting of PermitRootLogin to yes? In that case, the pattern to be searched should be PermitRootLogin[[:blank:]]+prohibit-password. At least this is the default setting in /etc/ssh/sshd_config in the xenial image.

Nevertheless, changing from prohibit-password to yes for root doesn't seem to make sense to me. root does not have a password so it can not log in with a password even if PasswordAuthentication is yes. In other words, no matter whether PermitRootLogin is prohibit-password or yes, root always has to log in with a key. I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant