Subject: Re: ssh and openssh
To: None <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 06/07/2002 18:15:54
On Fri, 7 Jun 2002 21:58:42 +0200 (MEST) Frank Knappe
<knappe@tu-harburg.de> wrote:
> 
> It seems that I have two different
> ssh-systems installed.
> 
> root@trinity# which ssh
> /usr/bin/ssh
> root@trinity# /usr/bin/ssh -v
> OpenSSH_2.5.1 NetBSD_Secure_Shell-20010614, SSH protocols 1.5/2.0,
> OpenSSL 0x0090581f
> 
> root@trinity# /usr/pkg/bin/ssh -v
> OpenSSH_3.2.3p1, SSH protocols 1.5/2.0, OpenSSL 0x0090600f
> 
> I also have have 3 different configuration files:
> /etc/sshd.conf
> /etc/sshd_config
> /usr/pkg/etc/ssh_config 
> The make install of the openssh says that is the right location, but I 
> think only for the 3.2 version.
> 
> Is there any way to remove the old Openssh version.

Frank, 

It sounds like you have 1.5.2 or so?  As of 1.5, IIRC, NetBSD included
ssh.  Like most system binaries, it's parked in /usr/bin, and its
configuration files are in /etc.  There are two configuration files, one
for the daemon, sshd(8), and one for the client, ssh(1).  

It looks like you installed the ssh package after that.  pkgsrc binaries
get parked in /usr/pkg/bin, configuration files in /usr/pkg/etc.  

To "get rid of" the old (non-pkg) version, remove/rename the binaries in
/usr/bin.  I suppose you'd want to do the same to the man pages
(/usr/share/man).  

As for the configuration files, /usr/pkg/bin/ssh will use
/usr/pkg/etc/ssh_config.  Once you've removed /usr/bin/ssh, the /etc files
won't have any effect other than confusing you, because .  Personally, I
like to forget what's a package and what's not, so I make symbolic links
from /etc to /usr/pkg/etc (or vice-versa).  That way, if I'm looking for a
configuration file, I can just look in /etc.  

I don't have OpenSSH_3.2.3p1; I'm using a much older version.  To be
certain which configuration file is being used, see "man -a ssh", paying
close attention to the location of each file, so you know if you're
looking at the page for the built-in or pkg version).

HTH.

--jkl