Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2002 22:44:31 -0500
From:      Scott Robbins <scottro@nyc.rr.com>
To:        Wayne Pascoe <freebsd@penguinpowered.org.uk>
Cc:        Lord Raiden <raiden23@netzero.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: ssh question
Message-ID:  <20020628034431.GA3546@scott1.homeunix.net>
In-Reply-To: <m2u1npp0jd.fsf@set.ehsrealtime.com>
References:  <4.2.0.58.20020626145348.009c1830@pop.netzero.net> <m2u1npp0jd.fsf@set.ehsrealtime.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 27, 2002 at 08:51:18AM +0000, Wayne Pascoe wrote:
> Lord Raiden <raiden23@netzero.net> writes:
> 
> > 
> > config_file" way of forcing ssh to use your config file of preference,
> > is there a setting in a file somewhere that SSHD looks at that tells
> 
> Possibly a compile time option.
> 
> > it to look at a particular config file by default?  Cause I'm not sure
> > it's going to want to use my default config file
> > "/etc/ssh/sshd_config" next time I reboot.  It's working right now
> > using that file, but I want it to see that file each time
> 
> If you've upgraded openssh from ports, then in your rc.conf you need
> the following line:
> 
> sshd_program="/usr/local/sbin/sshd"
> sshd_flags="-f /etc/ssh/sshd_config"

Yes, but don't you want it to use the new sshd_config file, that's in
/usr/local/etc/ssh/sshd_config?  I did a bit of testing (like renaming
the /etc/ssh/sshd_config file, etc) and it seems that if one adds the
first line you mention, the sshd_program line, and turns off the 
enable_sshd="YES" that, and, of course, lastly changing the new
/usr/local/etc/rc.d/sshd.sh.sample to /usr/local/etc/rc.d/sshd.sh that
upon boot, it will boot the /usr/local/ one which will read the
/usr/local/etc/ssh/sshd_config file.  

As Jonathan pointed out, if you have it read the /etc/sshd_config
file, the next time you do make world, it wants to put back the older
(2.9) /etc/ssh/sshd_config. Of course, one can avoid that with
mergemaster, but Jonathan's way seems the easiest and least
error-prone.
> 
> This will use the sshd binary that the port installed (instead of the
> base system one) and whatever config file you want.
> 
> > automatically when it first boots.  Any recommendations on how to fix
> > this?  Or does it do that anyways even with the new version and I'm
> 
> See above.

Of course, I ~could~ be wrong.  :)  Sigh, just ask my wife.

Scott Robbins


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020628034431.GA3546>