From owner-freebsd-questions@freebsd.org Wed Jan 4 04:08:22 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 945E1C9EA57 for ; Wed, 4 Jan 2017 04:08:22 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from oceanview.tundraware.com (oceanview.tundraware.com [45.55.60.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "oceanview.tundraware.com", Issuer "oceanview.tundraware.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FCB81F66 for ; Wed, 4 Jan 2017 04:08:21 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (ozzie.tundraware.com [75.145.138.73]) (authenticated bits=0) by oceanview.tundraware.com (8.15.2/8.15.2) with ESMTPSA id v0447aOS016980 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 3 Jan 2017 22:07:36 -0600 (CST) (envelope-from tundra@tundraware.com) Subject: Re: how to allow user toor login through ssh To: Ernie Luzar , Polytropon References: <5869ADFB.6080000@gmail.com> <20170102024359.aa82ae3e.freebsd@edvax.de> <5869F77D.5050106@gmail.com> <20170102172615.516dc912.freebsd@edvax.de> <20170103141838.4ada403b@helium> <586C4D68.6000000@gmail.com> <20170104024723.af718b7a.freebsd@edvax.de> <586C7446.208@gmail.com> Cc: Maciej Suszko , "freebsd-questions@freebsd.org" From: Tim Daneliuk Message-ID: Date: Tue, 3 Jan 2017 22:07:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <586C7446.208@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (oceanview.tundraware.com [45.55.60.57]); Tue, 03 Jan 2017 22:07:36 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: v0447aOS016980 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:08:22 -0000 On 01/03/2017 10:04 PM, Ernie Luzar wrote: > Polytropon wrote: >> On Wed, 04 Jan 2017 09:18:32 +0800, Ernie Luzar wrote: >>> Maciej Suszko wrote: >>>> On Tue, 3 Jan 2017 19:15:54 +0800 >>>> Ben Woods wrote: >>>> >>>>> The openssh daemon prevents login as root or toor (any user with UID >>>>> 0) in the default configuration that ships with FreeBSD. >>>>> >>>>> This can be adjusted by setting the following in /etc/ssh/sshd_config: >>>>> PermitRootLogin yes >>>>> >>>>> Note however, that it is not generally advisable to allow root or toor >>>>> login via ssh, as this is a frequently attempted username for script >>>>> kiddies and bots running random brute force attacks. Tread wisely. >>>>> >>>>> Regards, >>>>> Ben >>>> However it's quite simple to restrict root login using Match block, for >>>> example ;-) ... just leave 'no' globally. >>>> >>>> Match Address 10.0.0.0/27 >>>> PermitRootLogin yes >>> >>> >>> I like this solution. On my host I have changed ssh to us a high value port number back when I was on BSD REL 3.0 and have never had any failed login attacks of any kind. >> >> Moving SSH to a nonstandard port doesn't increase security per se, All good info ... shameless self-promotion follows ;) I use the following to essentially remove most noise from my ssh world. I came up with this some years ago while travelling extensively: https://www.tundraware.com/Software/tperimeter/ ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/