# sshd pid file

## linolium

Hi there, I'm having some problems with sshd.  Starting sshd with "/etc/init.d/sshd" has no problems, but it doesn't create a "/var/run/sshd.pid" file.  This seems necessary for the "/etc/init.d/sshd" script to shut down sshd, as it contains:

```
start-stop-daemon --stop --pidfile=/var/run/sshd.pid
```

to stop the daemon.  Obviously, this will fail, as "/var/run/sshd.pid" does not exist.  Is this a problem on other systems, or just mine?  If you run sshd, please try:

```
# /etc/init.d/sshd stop
```

and see if it [!!] errors on stop.  If anyone knows how to fix this behaviour, please let me know here!

----------

## dev

What happens when you run:

start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid --startas /usr/sbin/sshd

And then try to stop with:

start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid

You may want to remove/backup your /etc/init.d/sshd and re-emerge openssh. Just incase. Also check the permissions of /var/run just incase something there is fubar'd.

----------

## pjp

Moved from Other Things Gentoo.

----------

