sshd: fatal: daemon() failed: No such device
Hi All,
A few days ago SSH just failed on me, after reboot. Everytime I start sshd (/etc/rc.d/rc.sshd start), this appears in the syslog file: Jan 17 22:51:18 server sshd[11115]: fatal: daemon() failed: No such device I can run ssh in debug mode (sshd -d) and it runs fine. It just when it tried to daemonise itself that it fails. I was configuring before samba and postfix. I did a strace on working and not workind sshd daemon and they looked exactly the same. My linux distribution is Slackware 10.0 HELP :confused: |
Any idea what device the sshd daemon is trying to access. You could perhaps try:
grep -n '/dev/' /etc/rc.d/rc.sshd, but this would just help if the error occurred in the script and not the sshd binary. Do you have either a /dev/random or /dev/psuedo device, as well as a /dev/null device. Also, does your ssh daemon run in a jail? If so, there may be needed devices that need to be in jails dev directory. Maybe someone would have more ideas. Perhaps grep'ing all of the ssh config files for the '/dev/' string may help. |
check the /dev/null file!
I had exactly the same problem:
the solution is in the /dev/null file. it should now be a regular file, which is not recommended :) some install script probably replaced the /dev/null with a file of the same name... do the following: remove /dev/null and then: "mknod /dev/null c 1 3" this will create the /dev/null and sshd should start as normal. I also run slackware linux with the latest upgrade. |
It works... Thank you.
|
keex ! U ARE A GENIOUS HERO AND JUST SAVED MY LINUX WORLD! I was having the exactly same problem since desperate days of searching through log and config files!
BIG BIG THANK YOU! I would have never figured that out on my own! How did you figure it out? sshd not starting, not even spitting an error... must be the /dev/null file! holy cow, lol... i am missing some links there ;) is there any way to make sshd run in verbose? or logging to some file? ah okay i see /usr/sbin/sshd -dddd |
thanks!
glad I could help. I found out after "strace"-ing. after the log files failed on me, I logged in as root, stopped sshd with /etc/init.d/sshd stop, just to make sure, and typed in the following command: Code:
strace -f sshd 2>&1 | tee sshd.straceout Removing it and recreating it helped. :D |
thx keex!
u saved two lives for now :] I had same problem after kernel compile. No idea why it happend. Anyway is ok now, THX again !! /l. |
One more happy camper
A fresh install of SuSE 11.0 and /dev/null is a regular file for me, too.
I'd have never guessed it. THANK YOU!!! |
THANK YOU !!!
This saved my day ! |
A couple years later, and here I am with Ubuntu Lucid Lynx, and thank you to keex for the answer :D
|
Many thanks
I had this exact problem today on Gentoo. Seems it takes a long time for bug reports to filter through the system.
|
All times are GMT -5. The time now is 03:36 AM. |