openssh-server: change sshd.failsafe

There is no need to remove root password from /etc/shadow as the
password in the file is blank anyway in the failsafe mode.

Signed-off-by: Rucke Teg <rucketeg@protonmail.com>
This commit is contained in:
Rucke Teg 2022-02-10 23:00:55 +01:00 committed by Beginner-Go
parent d83bfc7256
commit 884dca6c95

View File

@ -8,8 +8,6 @@ failsafe_sshd () {
sshd_tmpdir=/tmp/sshd
mkdir $sshd_tmpdir
sed -i 's/^root:.*/root::0:17000:::::/g' /etc/shadow
for type in ed25519; do
key=$sshd_tmpdir/ssh_host_${type}_key
ssh-keygen -N '' -t ${type} -f ${key}