We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Setting SSH_ROOT_PASSWORD is not enough.
When trying to restore server I was unable to login due to sshd_config had: PermitRootLogin no
I propose a change to /usr/share/rear/rescue/default/50_ssh.sh from:
if [[ $SSH_ROOT_PASSWORD ]] ; then echo "root:$(echo $SSH_ROOT_PASSWORD | openssl passwd -1 -stdin):::::::" > $ROOTFS_DIR/etc/shadow fi
to:
if [[ $SSH_ROOT_PASSWORD ]] ; then echo "root:$(echo $SSH_ROOT_PASSWORD | openssl passwd -1 -stdin):::::::" > $ROOTFS_DIR/etc/shadow sed -i "/PermitRootLogin/d" /etc/ssh/sshd_config sed -i "/PasswordAuthentication/d" /etc/ssh/sshd_config echo "PermitRootLogin yes" >> /etc/ssh/sshd_config echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config fi
This will ensure the possibility to use password for login.
The text was updated successfully, but these errors were encountered:
Ok good thinking! Could you please create a pull request which makes my life so much easier! Thank you for the good suggestion, Gratien
On Fri, Jan 24, 2014 at 1:05 PM, sanderu notifications@github.com wrote:
Setting SSH_ROOT_PASSWORD is not enough. When trying to restore server I was unable to login due to sshd_config had: PermitRootLogin no I propose a change to /usr/share/rear/rescue/default/50_ssh.sh from: if [[ $SSH_ROOT_PASSWORD ]] ; then echo "root:$(echo $SSH_ROOT_PASSWORD | openssl passwd -1 -stdin):::::::" > $ROOTFS_DIR/etc/shadow fi to: if [[ $SSH_ROOT_PASSWORD ]] ; then echo "root:$(echo $SSH_ROOT_PASSWORD | openssl passwd -1 -stdin):::::::" > $ROOTFS_DIR/etc/shadow sed -i "/PermitRootLogin/d" /etc/ssh/sshd_config sed -i "/PasswordAuthentication/d" /etc/ssh/sshd_config echo "PermitRootLogin yes" >> /etc/ssh/sshd_config echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config fi This will ensure the possibility to use password for login. — Reply to this email directly or view it on GitHubhttps://github.com//issues/359 .
— Reply to this email directly or view it on GitHubhttps://github.com//issues/359 .
Sorry, something went wrong.
Have now forked project and created pull request.
No branches or pull requests
Setting SSH_ROOT_PASSWORD is not enough.
When trying to restore server I was unable to login due to sshd_config had:
PermitRootLogin no
I propose a change to /usr/share/rear/rescue/default/50_ssh.sh from:
to:
This will ensure the possibility to use password for login.
The text was updated successfully, but these errors were encountered: