From owner-freebsd-questions@FreeBSD.ORG Wed May 4 12:11:07 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92EED106564A for ; Wed, 4 May 2011 12:11:07 +0000 (UTC) (envelope-from repcsike@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 252338FC17 for ; Wed, 4 May 2011 12:11:06 +0000 (UTC) Received: by wwc33 with SMTP id 33so1067454wwc.31 for ; Wed, 04 May 2011 05:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ie9jRilvsS+ZTtLYC2Qz2IsIWTAGzCXVLAkSLBD2tHQ=; b=yIJ+Kb0UonpBtWydpicCDAYZI0kx9xuTZGdHY55AbRDZtWBHu8AbnrxzW/pXGPr1kT Gf3Ax4CjcsGkMKOrGVdawpDmzVjHICsIxfWB1X1wi21cOoYcrjMYnu3vyer5anFTy9Ii tL5t54V1qmhLhjhPLAqpmqzwzyFt4DXRDYnEM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=PSrIUdomsntzI+PEmWngcgLKpdGOnnB8HLRYJWN0nUjJN3L5aaSW/ex6rlaTkdacY8 5mbAxKkF+15dxbQ9TnlpEdJLbxHj+YZuNEPrQkD40gtiMmWqsK5uAP6gjbkEcY7sM33l 68I41c+rHQfEW02ucDqSIg9rKbrzTReNWziQc= MIME-Version: 1.0 Received: by 10.227.6.219 with SMTP id a27mr1057464wba.46.1304509635325; Wed, 04 May 2011 04:47:15 -0700 (PDT) Received: by 10.227.141.199 with HTTP; Wed, 4 May 2011 04:47:15 -0700 (PDT) In-Reply-To: <4DC139F7.9080109@infracaninophile.co.uk> References: <07CAE521148F4E7392202CD6B031F504@jarasc430> <4DC139F7.9080109@infracaninophile.co.uk> Date: Wed, 4 May 2011 13:47:15 +0200 Message-ID: From: =?ISO-8859-1?B?QmFs4XpzIE3hdOlmZnk=?= To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Limitting SSH access X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 12:11:07 -0000 On 4 May 2011 13:35, Matthew Seaman wrote: > On 04/05/2011 10:08, Jack Raats wrote: > > I have a question concerning SSH op a FreeBSD 7.4-STABLE server. > > > > Is it possible to limit the SSH access? > > I want t o restrict a user to his own home directory. > > So that if he connects to the server with SSH he only can go to his own > home dir. > > Also the same for sftp... > > > > I believe you will need to install a version of OpenSSH from ports to > get that functionality. It's the CHROOT config option in > security/openssh-portable > > Cheers > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matthew@infracaninophile.co.uk Kent, CT11 9PW > > Hello, It should work with the base openssh on 7.4. Check your version with sshd -v. Here, search for chroot(or use google :)): http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&sektion=5 Regarding ssh login, I usually use "rbash" from the ports, that restricts the user from leaving his or her home directory! Regards, Balazs Mateffy.