LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   sshd: fatal: daemon() failed: No such device (https://www.linuxquestions.org/questions/linux-networking-3/sshd-fatal-daemon-failed-no-such-device-279664/)

oru 01-19-2005 06:52 AM

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:

jschiwal 01-21-2005 12:28 AM

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.

keex 02-07-2005 05:54 AM

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.

oru 02-15-2005 02:20 AM

It works... Thank you.

Roke 11-09-2007 03:46 PM

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

keex 11-13-2007 03:32 AM

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
I looked at the output, searching for "daemon()" and found it, after or close to some special file opening syscalls. It had to do with /dev/null. So I checked that file for existance. it did exist, so looked at the file more closely and saw, it now was a huge and regular file.

Removing it and recreating it helped. :D

levnrg 01-03-2008 03:48 AM

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.

bkorb 06-29-2008 04:16 PM

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!!!

Spacetruckin 09-02-2009 03:42 AM

THANK YOU !!!
This saved my day !

wuf31 10-10-2011 03:38 AM

A couple years later, and here I am with Ubuntu Lucid Lynx, and thank you to keex for the answer :D

dimonic 08-13-2013 03:06 PM

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.