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