From owner-freebsd-questions Thu Dec 27 13:21:21 2001 Delivered-To: freebsd-questions@freebsd.org Received: from amsfep11-int.chello.nl (amsfep11-int.chello.nl [213.46.243.19]) by hub.freebsd.org (Postfix) with ESMTP id 0338437B417 for ; Thu, 27 Dec 2001 13:21:15 -0800 (PST) Received: from boss ([213.93.134.174]) by amsfep11-int.chello.nl (InterMail vM.5.01.03.06 201-253-122-118-106-20010523) with SMTP id <20011227212113.YKYU13581.amsfep11-int.chello.nl@boss>; Thu, 27 Dec 2001 22:21:13 +0100 From: "Rick Hoppe" To: "Johann Sharizan" Cc: Subject: RE: OpenSSH -- Make up your mind! Date: Thu, 27 Dec 2001 22:21:06 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20011227153102.F11529-100000@shumai.marcuscom.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Thu, 27 Dec 2001, Johann Sharizan wrote: > > > Hi. > > > > I recently installed the newest port of OpenSSH for security reasons, > > after having manually deleted all traces of the old one. > > > > After the installation the new config files could be found in > > /usr/local/etc. SSHD, however, complained it couldn't find > sshd_config in > > /etc/ssh. So I went ahead and moved them all from > /usr/local/etc to /etc/ssh. But now, SSHD brings me this output, > requiring a non-existent file: > > > > Could not load host key: /etc/ssh/ssh_host_rsa_key > > > > I'm utterly confused. > > OpenSSH (and SSH in general) requires you to generate keys before you can > run the server. Normally, FreeBSD does this the first time it boots up. > Have a look at the ssh-keygen command and /etc/rc.network for an example. > > Joe > Johann, You need to do what the ports installation of openssh (or openssh-portable) probably told yo to do...... You need to add the following line to /etc/rc.conf sshd_program="/usr/local/sbin/sshd" Then automatically the keys and sshd_config files from /usr/local/etc are used when you reboot your box. During the installation of the OpenSSH port, those keys and config file were created. It is also possible that your old sshd is still running. Make sure by telnetting to port 22 to see wich version is listening for connections. If the old version is still running, those errors are caused because by deleting (almost) all traces of the old version. /etc/rc.network indeed creates keys (when they're gone), but places them in /etc/ssh/ and your new OpenSSH version is installed in /usr/local/sbin/ and that uses the keys in /usr/local/etc. You may want to modify /etc/rc.network so the keys will be recreated in /usr/local/etc when they're deleted for some reason. I hope this helps. Regards, Rick Hoppe Network- and System Specialist (Jr.) Xtraxion Internet To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message