-
Notifications
You must be signed in to change notification settings - Fork 246
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
Fix SSH root login on the recovery system with some configurations #2070
Conversation
On Ubuntu 18.04 with OpenSSH 7.6, /etc/ssh/sshd_config contains commented-out lines for 'PermitRootLogin' and other options. This fix makes sure that settings changed for ReaR will be real, not comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me:
# echo -e '# PermitRootLogin foo\n # bar ClientAliveInterval baz' | sed -e 's/.*PermitRootLogin.*/#&/' -e '$ a PermitRootLogin yes' -e 's/.*ClientAliveInterval.*/#&/' -e '$ a ClientAliveInterval 0'
## PermitRootLogin foo
# # bar ClientAliveInterval baz
PermitRootLogin yes
ClientAliveInterval 0
Because usr/share/rear/skel/default/etc/scripts/run-sshd
modifies /etc/ssh/sshd_config only in ReaR's own recovery system
any modifications that make things work there are ok.
@gdha or any other @rear/contributors If there are no objections I would like to merge it tomorrow. @OliverO2 In gereral COPY_AS_IS ignores non existent files and I think
to get 'something' and/or 'something_else' into the recovery system
"rear mkrescue" just works fine -
|
So basically, run-sshd would fail one way or the other if the original system did not provide a complete openssh installation. |
@OliverO2 |
@OliverO2 |
Pull Request Details:
Supercedes: Fix SSH root login on the recovery system with some configurations #2068
Type: Bug Fix
Impact: High (cannot log in via SSH on rescue system)
Reference to related issue (URL):
How was this pull request tested? On Ubuntu 18.04.2 LTS
Brief description of the changes in this pull request:
On Ubuntu 18.04 with OpenSSH 7.6, /etc/ssh/sshd_config contains
commented-out lines for 'PermitRootLogin' and other options. This fix
makes sure that settings changed for ReaR will be real, not comments.