LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 04-04-2004, 04:45 PM   #1
Inexactitude
Member
 
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477

Rep: Reputation: 30
Strange ssh problem


I was having problems with my sendmail server, but when I fixed the problem, I startedd getting strange emails in my root users mailbox. The messages read like this:

Quote:
From operator@blah(Cron Daemon)
To operator@blah
Subject Cron <operator@blah> /usr/libexec/save-entropy

Could not load host key: /usr/local/etc/ssh_host_key
Could not load host key: /usr/local/etc/ssh_host_rsa_key
Could not load host key: /usr/local/etc/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
So I'm getting about 100 of these a day. So what I did was chmod 777 /usr/local/etc/ssh_host_key and the rest (I know that this isn't a safe practice). The emails stop coming, but now I get "failed to bind to address" errors from ssh about every 5 - 15 minutes. So I chmod 700 the keys again, and the emails start coming again, but no more errors from ssh. I don't think that this is much of a big deal, but I would like to know why this is happening all of a sudden.

By the way, the ssh server was working correctly the whole time it seemed.

Thanks for any help.
 
Old 04-04-2004, 06:42 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
I assume you're using FreeBSD (you don't say in your post, so I'm guessing from the side bar and from your problem). /usr/local/etc is used by the ports version of SSH, SFAIK. I think the builtin version uses the standard /etc/ssh directory. Are you sure it's not trying to start two SSH daemons? That would seem to be the problem, since you got "failed to bind to address" (which is probably because there's already an SSH daemon listening).

If you're using the base system version of SSH, then you should disable the ports version. There should be some startup scripts in /usr/local/etc/something (rc?). Move the SSH script to being "hidden" so that it's not started (mv ssh-script .ssh-script), then kill the SSH daemon that's starting from /usr/local directory (ps aux |grep ssh |grep /usr/local, then kill the PID).

Absolutely do NOT make the SSH key files world writeable. You will get you could potentially have a trivial compromise. No system daemon should ever require having it's files be world writeable, so that should never be part of your troubleshooting. In particular, the system keys for SSH should all be 600 (that's the private keys).
 
Old 04-05-2004, 01:37 PM   #3
Inexactitude
Member
 
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477

Original Poster
Rep: Reputation: 30
Okay, I fixed the problem. All I had to do was to do 'ssh_enable= "NO"' in my rc.conf. I wonder why this problem started happening in the first place though, because I don't remember doing anything to provoke it, and this hasn't been happening even though i've been running the ports version of sshd with the base one killed, and had ssh_enable = "YES" in rc.conf the whole time anyway. Strange....

Thanks for the help.
 
  


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
Strange SSH problem graw Linux - Networking 6 12-15-2004 04:47 PM
strange ssh problem yull Linux - Security 8 12-11-2004 02:58 PM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 05:16 PM
strange characters while loggin in through ssh legolin Linux - Networking 3 08-14-2004 02:39 AM
Strange! SSH and Telnet login problem McSmooth Linux - General 7 10-03-2003 09:24 AM


All times are GMT -5. The time now is 05:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration