/var/run/sshd is not being created in the discourse image


(Steven Arnott) #1

When I run bootstrap with the following template in the containers/app.yml

   templates:
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

The sshd.template.yml does not seem to ‘create’ the /var/run/sshd directory as instructed in the template:

 - exec:
      hook: sshd
      cmd:
        - mkdir -p /var/run/sshd
        - mkdir -p /root/.ssh

The docker logs then fill with complaints about it:

Missing privilege separation directory: /var/run/sshd
Missing privilege separation directory: /var/run/sshd
Missing privilege separation directory: /var/run/sshd
Missing privilege separation directory: /var/run/sshd

(Sam Saffron) #2

I have been ripping out SSH support from launcher and template, its just awkward and uneeded code.

docker exec and ./launcher enter do the trick, no need for ssh.


(Allen - Watchman Monitoring) #3

Not true… I have to SFTP files into the docker container after every update.

While this isn’t a supported configuration, if I can’t ssh into the container it’s certainly going to be a pain.


(Sam Saffron) #4

You can still set it up, but launcher specific hacks are getting junked


(Kane York) #5

Use a cp command from /shared to accomplish it instead.


(Steven Arnott) #6

While ‘ssh’ might not be needed for most installations, having it as an add on does have value.
The template does need to work correctly.


(Sam Saffron) #7

Support in the template is going to have to come from the community, technically it can be done.


(Steven Arnott) #8

In the bootstrap i see a mkdir -p /var/run/sshd but it then disappears… hmmm

I, [2015-06-16T15:44:05.194183 #38]  INFO -- : Loading --stdin
I, [2015-06-16T15:44:05.198331 #38]  INFO -- : Replacing session    required     pam_loginuid.so with  in /etc/pam.d/sshd
I, [2015-06-16T15:44:05.204170 #38]  INFO -- : File > /etc/service/sshd/run  chmod: +x
I, [2015-06-16T15:44:05.208350 #38]  INFO -- : File > /etc/runit/3.d/99-ssh  chmod: +x
I, [2015-06-16T15:44:05.210463 #38]  INFO -- : > mkdir -p /var/run/sshd
I, [2015-06-16T15:44:05.212334 #38]  INFO -- :