From owner-freebsd-questions@FreeBSD.ORG Sun Aug 3 12:59:25 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70E72880 for ; Sun, 3 Aug 2014 12:59:25 +0000 (UTC) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CCC42A3A for ; Sun, 3 Aug 2014 12:59:24 +0000 (UTC) Received: from [192.168.0.4] (rbn1-216-180-76-216.adsl.hiwaay.net [216.180.76.216]) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id s73CxOFr018641 for ; Sun, 3 Aug 2014 07:59:24 -0500 Message-ID: <53DE33A3.3020902@hiwaay.net> Date: Sun, 03 Aug 2014 08:05:39 -0500 From: "William A. Mahaffey III" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: permission problems w/ ordinary user .... References: <53DD742F.3020408@hiwaay.net> <20140802234554.GA34503@slackbox.erewhon.home> <53DD7B4D.90903@hiwaay.net> <2489109.sNVhnsNWVW@curlew.lan> In-Reply-To: <2489109.sNVhnsNWVW@curlew.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 12:59:25 -0000 On 08/03/14 04:23, Mike Clarke wrote: > On Saturday 02 August 2014 18:59:09 William A. Mahaffey III wrote: >> On 08/02/14 18:45, Roland Smith wrote: >>> On Sat, Aug 02, 2014 at 06:28:47PM -0500, William A. Mahaffey III > wrote: > > [snip] > >>>> I can ssh in as root no sweat >>> Yikes. That is usually the first thing I'd disable! >>> >>> >>> Roland >> I do that (easy root login) on purpose, my LAN is not internet >> exposed (except when I'm browsing) > You can make things a bit more secure by requiring ssh keys instead of > a password for remote access. > > Use ssh-keygen to generate your keys then append your ~/ssh/id_rsa.pub > to /root/.ssh/authorized_keys on the machine where you need root > access. > > Then make these changes to /etc/ssh/sshd_config on the remote machine > and restart sshd. > > --- /usr/src/crypto/openssh/sshd_config 2013-01-12 13:21:39.235909173 > +0000 > +++ /etc/ssh/sshd_config 2013-01-12 13:20:23.078909059 +0000 > @@ -45,4 +45,5 @@ > #LoginGraceTime 2m > #PermitRootLogin no > +PermitRootLogin without-password > #StrictModes yes > #MaxAuthTries 6 > @@ -64,5 +65,5 @@ > > # Change to yes to enable built-in password authentication. > -#PasswordAuthentication no > +PasswordAuthentication no > #PermitEmptyPasswords no > > NB. If you don't have physical access to the remote machine then be > very careful not to make any mistakes which could lock you out of it. > In particular make sure you have set up your keys and edited > /root/.ssh/authorized_keys correctly before reconfiguring sshd. To be > on the safe side confirm that you can make a successful remote login > from another terminal window before closing your current remote > session. This (keyed access) is how I have every machine on my network setup, just haven't gotten there yet w/ this (very new) box. *High* on my TODO list .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.