Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_server_hardening
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
ansible_lza_server_hardening
Commits
2a52041a
Commit
2a52041a
authored
2 years ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
feat: prohibit SSH login with anything other than publickey and for certain users
parent
f26accad
No related branches found
No related tags found
No related merge requests found
Pipeline
#3685
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/configure_ssh_hardening.yml
+3
-3
3 additions, 3 deletions
tasks/configure_ssh_hardening.yml
with
3 additions
and
3 deletions
tasks/configure_ssh_hardening.yml
+
3
−
3
View file @
2a52041a
...
@@ -34,11 +34,11 @@
...
@@ -34,11 +34,11 @@
PermitRootLogin no
PermitRootLogin no
# PermitRootLogin forced-commands-only
# PermitRootLogin forced-commands-only
# AllowUsers root lza import
# AllowUsers root lza import
#
DenyUsers
slub
DenyUsers
dps
# DenyUsers import
# DenyUsers import
# AllowGroups example1 example2
# AllowGroups example1 example2
# DenyGroups example1 example2
# DenyGroups example1 example2
#
AuthenticationMethods
an
y
AuthenticationMethods
publicke
y
LoginGraceTime 2m
LoginGraceTime 2m
PermitEmptyPasswords no
PermitEmptyPasswords no
PrintLastLog yes
PrintLastLog yes
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
ClientAliveCountMax 2
ClientAliveCountMax 2
MaxAuthTries 3
MaxAuthTries 3
TCPKeepAlive no
TCPKeepAlive no
{{ "
PasswordAuthentication no
" if ansible_os_family == "Debian" else "PasswordAuthentication yes" }}
PasswordAuthentication no
# disable weak host key algorithm ssh-dss (Digital Signature Algorithm (DSA) / Digital Signature Standard (DSS))
# disable weak host key algorithm ssh-dss (Digital Signature Algorithm (DSA) / Digital Signature Standard (DSS))
# NVT OID: 1.3.6.1.4.1.25623.1.0.117687
# NVT OID: 1.3.6.1.4.1.25623.1.0.117687
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment