mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 14:01:42 +08:00
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:
parent
d83bfc7256
commit
884dca6c95
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user