Some HTTPS improvements to achieve A+ on Qualsys SSL Labs
[discourse_docker.git] / templates / sshd.template.yml
CommitLineData
9fb5f2d3
SS
1params:
2 # SSH key is required for remote access into the container
4ae88123
SS
3 # you may also use ssh-import-id
4 ssh_key: ""
5 # so ssh-import-id works
6
7env:
8 HOME: /root
9fb5f2d3
SS
9
10run:
11
025a598b
S
12 - replace:
13 filename: /etc/pam.d/sshd
14 from: "session required pam_loginuid.so"
15 to: ""
16
17
9fb5f2d3
SS
18 - file:
19 path: /etc/service/sshd/run
20 chmod: "+x"
21 contents: |
adff6a90 22 #!/bin/bash
9fb5f2d3
SS
23 exec 2>&1
24 exec /usr/sbin/sshd -D -e
25
074f2b6a
S
26 - file:
27 path: /etc/runit/3.d/99-ssh
28 chmod: "+x"
29 contents: |
30 #!/bin/bash
31 sv stop sshd
32
9fb5f2d3 33 - exec:
8a62ef0e 34 hook: sshd
9fb5f2d3
SS
35 cmd:
36 - mkdir -p /var/run/sshd
37 - mkdir -p /root/.ssh
edfebd9e 38 - echo "$ssh_key" >> /root/.ssh/authorized_keys
88126eba 39 - echo "$$ENV_SSH_PUB_KEY" >> /root/.ssh/authorized_keys
edfebd9e 40 - chmod 640 /root/.ssh/authorized_keys
553a4fc9
S
41 - rm /etc/update-motd.d/00-header
42 - rm /etc/update-motd.d/10-help-text
553a4fc9
S
43 - rm /etc/legal
44 - file:
45 path: /etc/update-motd.d/00-discourse
46 chmod: +x
47 contents: |
48 #!/bin/sh
49 echo
50 echo Welcome to Discourse Docker
51 echo