Fix UFW install
This commit is contained in:
@@ -261,7 +261,6 @@ class WOSiteEditController(CementBaseController):
|
|||||||
label = 'edit'
|
label = 'edit'
|
||||||
stacked_on = 'site'
|
stacked_on = 'site'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = ('Edit Nginx configuration of site')
|
description = ('Edit Nginx configuration of site')
|
||||||
arguments = [
|
arguments = [
|
||||||
(['site_name'],
|
(['site_name'],
|
||||||
@@ -316,7 +315,6 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
label = 'create'
|
label = 'create'
|
||||||
stacked_on = 'site'
|
stacked_on = 'site'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = ('this commands set up configuration and installs '
|
description = ('this commands set up configuration and installs '
|
||||||
'required files as options are provided')
|
'required files as options are provided')
|
||||||
arguments = [
|
arguments = [
|
||||||
@@ -792,7 +790,6 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
label = 'update'
|
label = 'update'
|
||||||
stacked_on = 'site'
|
stacked_on = 'site'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = ('This command updates websites configuration to '
|
description = ('This command updates websites configuration to '
|
||||||
'another as per the options are provided')
|
'another as per the options are provided')
|
||||||
arguments = [
|
arguments = [
|
||||||
@@ -1826,7 +1823,6 @@ class WOSiteDeleteController(CementBaseController):
|
|||||||
label = 'delete'
|
label = 'delete'
|
||||||
stacked_on = 'site'
|
stacked_on = 'site'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = 'delete an existing website'
|
description = 'delete an existing website'
|
||||||
arguments = [
|
arguments = [
|
||||||
(['site_name'],
|
(['site_name'],
|
||||||
@@ -1966,7 +1962,6 @@ class WOSiteListController(CementBaseController):
|
|||||||
label = 'list'
|
label = 'list'
|
||||||
stacked_on = 'site'
|
stacked_on = 'site'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = 'List websites'
|
description = 'List websites'
|
||||||
arguments = [
|
arguments = [
|
||||||
(['--enabled'],
|
(['--enabled'],
|
||||||
|
|||||||
@@ -502,7 +502,9 @@ class WOStackController(CementBaseController):
|
|||||||
Log.debug(self, "Downloading following: {0}".format(packages))
|
Log.debug(self, "Downloading following: {0}".format(packages))
|
||||||
WODownload.download(self, packages)
|
WODownload.download(self, packages)
|
||||||
Log.debug(self, "Calling post_pref")
|
Log.debug(self, "Calling post_pref")
|
||||||
|
Log.wait(self, "Configuring packages")
|
||||||
post_pref(self, [], packages)
|
post_pref(self, [], packages)
|
||||||
|
Log.valide(self, "Configuring packages")
|
||||||
|
|
||||||
if disp_msg:
|
if disp_msg:
|
||||||
if (self.msg):
|
if (self.msg):
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
label = 'config'
|
label = 'config'
|
||||||
stacked_on = 'stack'
|
stacked_on = 'stack'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = ('Upgrade stack safely')
|
description = ('Upgrade stack safely')
|
||||||
arguments = [
|
arguments = [
|
||||||
(['--nginx'],
|
(['--nginx'],
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ class WOStackStatusController(CementBaseController):
|
|||||||
label = 'stack_services'
|
label = 'stack_services'
|
||||||
stacked_on = 'stack'
|
stacked_on = 'stack'
|
||||||
stacked_type = 'embedded'
|
stacked_type = 'embedded'
|
||||||
exit_on_close = True
|
|
||||||
description = 'Check the stack status'
|
description = 'Check the stack status'
|
||||||
|
|
||||||
@expose(help="Start stack services")
|
@expose(help="Start stack services")
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
label = 'upgrade'
|
label = 'upgrade'
|
||||||
stacked_on = 'stack'
|
stacked_on = 'stack'
|
||||||
stacked_type = 'nested'
|
stacked_type = 'nested'
|
||||||
exit_on_close = True
|
|
||||||
description = ('Upgrade stack safely')
|
description = ('Upgrade stack safely')
|
||||||
arguments = [
|
arguments = [
|
||||||
(['--all'],
|
(['--all'],
|
||||||
|
|||||||
45
wo/cli/templates/sshd.mustache
Normal file
45
wo/cli/templates/sshd.mustache
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Use a custom port in the following range : 1024-65536
|
||||||
|
Port {{sshport}}
|
||||||
|
|
||||||
|
#Prefer ed25519 & ECDSA keys rather than 2048 bit RSA
|
||||||
|
HostKey /etc/ssh/ssh_host_rsa_key
|
||||||
|
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||||
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||||
|
|
||||||
|
# Allow root access with ssh keys
|
||||||
|
PermitRootLogin without-password
|
||||||
|
|
||||||
|
# Allow ssh access to some users only
|
||||||
|
AllowUsers root ubuntu
|
||||||
|
|
||||||
|
# allow ssh key Authentication
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
|
||||||
|
# ssh keys path in ~/.ssh/authorized_keys
|
||||||
|
AuthorizedKeysFile %h/.ssh/authorized_keys
|
||||||
|
|
||||||
|
# No password or empty passwords Authentication
|
||||||
|
PasswordAuthentication {{allowpass}}
|
||||||
|
PermitEmptyPasswords no
|
||||||
|
|
||||||
|
# No challenge response Authentication
|
||||||
|
ChallengeResponseAuthentication no
|
||||||
|
|
||||||
|
UsePAM yes
|
||||||
|
X11Forwarding yes
|
||||||
|
|
||||||
|
#PrintMotd no
|
||||||
|
|
||||||
|
# Allow client to pass locale environment variables
|
||||||
|
AcceptEnv LANG LC_*
|
||||||
|
|
||||||
|
# override default of no subsystems
|
||||||
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||||
|
|
||||||
|
# Host keys the client accepts - order here is honored by OpenSSH
|
||||||
|
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256
|
||||||
|
|
||||||
|
# use strong ciphers
|
||||||
|
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
|
||||||
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||||
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
||||||
@@ -58,8 +58,4 @@ wo_ufw_setup() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if { wo_ufw_setup; }; then
|
wo_ufw_setup
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user