mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
Fix bug in Stretch builds. sshd_config no longer contains
PermitRootLogin. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852781
This commit is contained in:
parent
7ccce031e0
commit
96ebfe11fa
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ class EnableRootLogin(Task):
|
|||
sshdconfig_path = os.path.join(info.root, 'etc/ssh/sshd_config')
|
||||
if os.path.exists(sshdconfig_path):
|
||||
from bootstrapvz.common.tools import sed_i
|
||||
sed_i(sshdconfig_path, '^PermitRootLogin .*', 'PermitRootLogin yes')
|
||||
sed_i(sshdconfig_path, '^#?PermitRootLogin .*', 'PermitRootLogin yes')
|
||||
else:
|
||||
import logging
|
||||
logging.getLogger(__name__).warn('The OpenSSH server has not been installed, '
|
||||
|
@ -75,7 +75,7 @@ class DisableRootLogin(Task):
|
|||
sshdconfig_path = os.path.join(info.root, 'etc/ssh/sshd_config')
|
||||
if os.path.exists(sshdconfig_path):
|
||||
from bootstrapvz.common.tools import sed_i
|
||||
sed_i(sshdconfig_path, '^PermitRootLogin .*', 'PermitRootLogin no')
|
||||
sed_i(sshdconfig_path, '^#?PermitRootLogin .*', 'PermitRootLogin no')
|
||||
else:
|
||||
import logging
|
||||
logging.getLogger(__name__).warn('The OpenSSH server has not been installed, '
|
||||
|
|
Loading…
Add table
Reference in a new issue