Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-19-2005, 06:52 AM   #1
LQ Newbie
Registered: Jan 2005
Location: Estonia
Distribution: Slackware 10.0
Posts: 8

Rep: Reputation: 0
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

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

Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-21-2005, 12:28 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
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.
Old 02-07-2005, 05:54 AM   #3
Registered: Jun 2002
Location: Berlin / Germay
Distribution: gentoo linux, ubuntu
Posts: 40

Rep: Reputation: 17
Lightbulb 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.
2 members found this post helpful.
Old 02-15-2005, 02:20 AM   #4
LQ Newbie
Registered: Jan 2005
Location: Estonia
Distribution: Slackware 10.0
Posts: 8

Original Poster
Rep: Reputation: 0
It works... Thank you.
Old 11-09-2007, 03:46 PM   #5
LQ Newbie
Registered: Nov 2007
Posts: 4

Rep: Reputation: 0
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!


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
Old 11-13-2007, 03:32 AM   #6
Registered: Jun 2002
Location: Berlin / Germay
Distribution: gentoo linux, ubuntu
Posts: 40

Rep: Reputation: 17
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:
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.
Old 01-03-2008, 03:48 AM   #7
LQ Newbie
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
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 !!

Old 06-29-2008, 04:16 PM   #8
GNU Contributor
Registered: Sep 2006
Location: Sta. Cruz, CA
Distribution: openSUSE
Posts: 62

Rep: Reputation: 17
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!!!
Old 09-02-2009, 03:42 AM   #9
LQ Newbie
Registered: Sep 2009
Location: Sweden, Jönköping
Posts: 1

Rep: Reputation: 0
This saved my day !
Old 10-10-2011, 03:38 AM   #10
LQ Newbie
Registered: Oct 2006
Posts: 4

Rep: Reputation: 0
Thumbs up

A couple years later, and here I am with Ubuntu Lucid Lynx, and thank you to keex for the answer
Old 08-13-2013, 03:06 PM   #11
LQ Newbie
Registered: Aug 2013
Posts: 21

Rep: Reputation: Disabled
Many thanks

I had this exact problem today on Gentoo. Seems it takes a long time for bug reports to filter through the system.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logwatch reports SSHD Killed: / Failed to bind: port 22 rioguia Linux - Security 1 08-13-2005 12:24 PM
SSHD + Daemon questions ps2cho Linux - Distributions 1 06-30-2005 06:56 PM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 08:46 PM
How do I stop the sshd daemon? ebenh Linux - Software 5 09-04-2004 01:06 PM
sshd failed vcheah Linux - Software 0 12-31-2001 03:49 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration