sshd not creating PID file [CentOS5]
sshd on my CentOS5 box is not creating a PID file on startup, which is causing problems when trying to monitor the daemon. I've searched the system in case the file isn't made in /var/run, but came up empty.
There's nothing in /var/log/messages to say why it can't create the file. Running `/var/sbin/sshd -t` doesn't throw any errors. I've tried forcing the output by putting "PidFile /var/run/sshd.pid" in /etc/ssh/ssh_config, but no luck there. Any suggestions on where I can look next? |
First of all you shouldnt do this: /var/sbin/sshd -t. In CentOS is /usr/sbin/sshd -t.
You can try find it 2 ways: which sshd|xargs ls -la or if this doesnt work then: find /usr -name "sshd" -type f -exec ls -la {} \; Also you could try to monitor all the logs, by modified syslog configuration: Add this line in syslog.conf nano /etc/syslog.conf go to end of the file and add: *.debug /var/log/syslog.out save file restart syslog: /etc/init.d/syslog restart then: tail -f /var/log/syslog.out open a new console (sshd sessions) and try /usr/sbin/sshd or /etc/init.d/sshd start and see what errors might accrue. |
Quote:
Thanks, I'll give the rest a try. |
Quote:
?? Also, to start/stop sshd: # service sshd start/stop |
Putting the PidFile path in the config and a cheeky restart of the box sorted the issue.
Thanks! |
All times are GMT -5. The time now is 06:27 PM. |