Question: I installed boot2docker on a vm (host: windows 7)
My goal is to ssh into the boot2docker vm via putty.

I configured the /usr/local/etc/ssh/sshd\_config file to my needs and now i wanted to reload/restart the sshd service.
I searched for the sshd file because "sudo service sshd restart" does not work. i found the following:
`/var/lib/sshd` `/etc/rc.d/sshd` and `/usr/local/sbin/sshd`
the first one says "Pemission denied", the second didnt print anything and the third says "not found"

Does anyone know how i can reload/restart the sshd service without rebooting?

Answer: 
If you are ssh'ed into boot2docker, try `sudo pkill -HUP sshd`

```
Boot2Docker version 18.03.0-ce-rc4, build HEAD : c6a9f09
Docker version 18.03.0-ce-rc4, build fbedb97
docker@dockernode1:~$ sudo pkill -HUP sshd
docker@dockernode1:~$ Connection to 192.168.137.211 closed by remote host.
exit status 255

$ ./docker-machine ssh dockernode1
Boot2Docker version 18.03.0-ce-rc4, build HEAD : c6a9f09
Docker version 18.03.0-ce-rc4, build fbedb97

```

Make sure your `/usr/local/etc/ssh/sshd_config` is good, this boots you out of the server.

Correcting bad config is painful via HyperV Connect, doesnt accept Copy-Paste commands and Type Clipboard Text output gets corrupted. Have to type every character.
you cannot use services inside docker container (no systemctl, service). Everything has to run in foreground. You can use [supervisor](https://docs.docker.com/config/containers/multi-service_container/) to run multiple apps inside one container. I would also recommend reading this response about [sshd inside docker](https://forums.docker.com/t/start-service-using-systemctl-inside-docker-conatiner/39992/2)

if you want to run sshd you have to run it in not daemonized mode using the `-D`

```
/usr/sbin/sshd -D

```

The path to sshd might be different in your container.