Give GitLab SSH port 22 and use 2309 for SSH access

This commit is contained in:
2022-09-04 23:33:21 +02:00
parent 9eb1732d23
commit 5dfa5d91e4
4 changed files with 31 additions and 3 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
[misc]
h2954114.stratoserver.net
pbrinkmeier.de
+8
View File
@@ -0,0 +1,8 @@
# All tasks for misc, use this to check whether everything is deployed.
---
- name: Set up basic packages, Docker, Nix, sshd
import_playbook: misc-setup.yaml
- name: Deploy Docker configuration
import_playbook: misc-docker.yaml
- name: Check out static websites from git
import_playbook: misc-sites.yaml
@@ -30,3 +30,23 @@
- docker
- docker-compose
- requests
- name: Configure sshd
register: sshdconfig
become: yes
copy:
dest: /etc/ssh/sshd_config.d/00_pbri.conf
mode: u=rw,g=r,o=r
# Included by /etc/ssh/sshd_config before other configuration
content: |
Port 2309
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
validate: /usr/sbin/sshd -T -f %s
- name: Restart sshd
when: sshdconfig.changed
become: yes
service:
name: sshd
state: restarted