more work, get rid of jail stuff, using vps directly
This commit is contained in:
14
roles/ssh/files/sshd_config
Normal file
14
roles/ssh/files/sshd_config
Normal file
@@ -0,0 +1,14 @@
|
||||
LogLevel INFO
|
||||
LoginGraceTime 1m
|
||||
PermitRootLogin no
|
||||
StrictModes yes
|
||||
MaxAuthTries 3
|
||||
MaxSessions 2
|
||||
PubkeyAuthentication yes
|
||||
PasswordAuthentication no
|
||||
KbdInteractiveAuthentication no
|
||||
AllowAgentForwarding no
|
||||
AllowTcpForwarding no
|
||||
GatewayPorts no
|
||||
X11Forwarding no
|
||||
|
||||
7
roles/ssh/handlers/main.yaml
Normal file
7
roles/ssh/handlers/main.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: start sshd
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
async: 45
|
||||
poll: 5
|
||||
11
roles/ssh/tasks/main.yaml
Normal file
11
roles/ssh/tasks/main.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: copy config file
|
||||
copy:
|
||||
src: sshd_config
|
||||
dest: "/etc/ssh/"
|
||||
|
||||
- name: restart sshd
|
||||
community.general.sysrc:
|
||||
name: sshd_enable
|
||||
value: "YES"
|
||||
notify: restart sshd
|
||||
Reference in New Issue
Block a user