Somehow sshd stopped running and no amount of start, restart or onestart will make it go again. I normally ssh into it from a dual-boot laptop computer that shows up on the network as gabi-buntu when running Ubuntu Karmic, and as gabi-pc when running Windows XP Pro. Neither my Putty connection nor the Linux terminal can establish a ssh link anymore.

Upon rebooting the server, I am greeted with "/etc/rc: WARNING: run_rc_command: cannot run /usr/sbin/sshd". In addition, a message will appear saying things like

rpc.statd: failed to contact host gabi-buntu RPC: port mapper failure RPC: timed out

Everything else works fine. The FreeBSD 7.2 box runs a print server, a Samba server, and an Apache server for a wiki via https. It also serves up NFS shares for Linux clients.

Any suggestions?

link|improve this question
What does "sshd -d" give you? – Geoff Fritz Jan 20 '10 at 18:38
1  
I would start from the warning "cannot run /usr/sbin/sshd". Check if that file is indeed there and if it is executable. You might also want to check the modification time. If the file exists, then "/usr/sbin/sshd -d" as Geoff suggested would be helpful. – Marie Fischer Jan 20 '10 at 19:23
feedback

1 Answer

Geoff and Marie, I didn't get that far. I'm new here. I kept an eye on this question but it kept showing no answers, so I never actually looked at it -- which would have alerted me to your comments. I found a workaround.

First, my diagnostic:

Turns out the NFS server does care whether its clients are present. I didn't know. I assumed it just served whoever was there, looking to be served.

The "gabi-buntu" client was the Ubuntu Karmic half of a dual-boot laptop. Karmic does not suspend/hibernate on a laptop -- or at best it does, but it can't wake up, which is the same thing because it takes a cold restart. That event registers with the NFS server's rpc.statd daemon as a client crash. That's what caused the port mapper failure -- see the BUGS section of rpc.statd(8) in the FreeBSD man pages.

My workaround:

I don't really need an NFS server. Until Ubuntu figures out how to suspend/hibernate on laptops, I'll stick with Win XP and access my server share via Samba. That works fine.

So, all I had to do was fix ssh. The /usr/sbin/sshd file was there alright. I'm not sure why it didn't work, but it doesn't matter: "make -D WITH_OVERWRITE_BASE deinstall reinstall clean" of the "openssh-portable" port cured whatever ailed it and it works now.

link|improve this answer
1  
FYI, if you want to reinstall the base sshd and you have the source installed you can cd /usr/src/secure/usr.sbin/sshd ; make ; make install as root – Chris S Apr 3 '10 at 3:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.