Add force argument to secure ssh
This commit is contained in:
@@ -37,8 +37,8 @@ class WOSecureController(CementBaseController):
|
||||
help='set custom ssh port', action='store_true')),
|
||||
(['--ssh'], dict(
|
||||
help='harden ssh security', action='store_true')),
|
||||
(['--ufw'],
|
||||
dict(help='setup and configure ufw firewall',
|
||||
(['--force'],
|
||||
dict(help='force execution without being prompt',
|
||||
action='store_true')),
|
||||
(['user_input'],
|
||||
dict(help='user input', nargs='?', default=None)),
|
||||
@@ -155,6 +155,8 @@ class WOSecureController(CementBaseController):
|
||||
@expose(hide=True)
|
||||
def secure_ssh(self):
|
||||
"""Harden ssh security"""
|
||||
pargs = self.app.pargs
|
||||
if not pargs.force:
|
||||
start_secure = input('Are you sure you to want to'
|
||||
' harden SSH security ?'
|
||||
'\nSSH login with password will not '
|
||||
|
||||
Reference in New Issue
Block a user