LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2005, 07:52 AM   #1
oru
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
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
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-21-2005, 01:28 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 06:54 AM   #3
keex
Member
 
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, 03:20 AM   #4
oru
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, 04:46 PM   #5
Roke
LQ Newbie
 
Registered: Nov 2007
Posts: 5

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!

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

Rep: Reputation: 17
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.
 
Old 01-03-2008, 04:48 AM   #7
levnrg
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 !!

/l.
 
Old 06-29-2008, 05:16 PM   #8
bkorb
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, 04:42 AM   #9
Spacetruckin
LQ Newbie
 
Registered: Sep 2009
Location: Sweden, Jönköping
Posts: 1

Rep: Reputation: 0
THANK YOU !!!
This saved my day !
 
Old 10-10-2011, 04:38 AM   #10
wuf31
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, 04:06 PM   #11
dimonic
LQ Newbie
 
Registered: Aug 2013
Posts: 24

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.
 
  


Reply


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: 0.0.0.0 port 22 rioguia Linux - Security 1 08-13-2005 01:24 PM
SSHD + Daemon questions ps2cho Linux - Distributions 1 06-30-2005 07:56 PM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 09:46 PM
How do I stop the sshd daemon? ebenh Linux - Software 5 09-04-2004 02:06 PM
sshd failed vcheah Linux - Software 0 12-31-2001 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:51 PM.

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