From owner-freebsd-questions@FreeBSD.ORG Wed Mar 30 21:51:27 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CF6E16A4CE for ; Wed, 30 Mar 2005 21:51:27 +0000 (GMT) Received: from incubus.nodes.net.ad-flow.com (INCUBUS.NODES.NET.EXOCOMM.NET [66.59.162.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 679CB43D48 for ; Wed, 30 Mar 2005 21:51:26 +0000 (GMT) (envelope-from danstemporaryaccount@yahoo.ca) Received: from douglas ([192.168.3.232]) (authenticated)j2ULomF17228 for ; Wed, 30 Mar 2005 21:50:48 GMT Exocomm-Delivery-Date: Wed, 30 Mar 2005 21:50:48 GMT Exocomm-URL: www.exocomm.com From: daniel To: freebsd-questions@freebsd.org Date: Wed, 30 Mar 2005 16:51:15 -0500 User-Agent: KMail/1.8 References: <424B13EF.6050400@att.net> In-Reply-To: <424B13EF.6050400@att.net> X-Face: 8+SW+qM.\@DKPn(; }IU]\5{VaK6W{sPv->=?utf-8?q?l28Lv=0A=09=5EzgOh=7B=3Ap=7C=27=27N=26=7EOQU=7C=25aCgH?="M$;M\6C:-0.sn9Ml!v/uP*4I!e6z((sz-uY4,=K/6RWM"=?utf-8?q?o=0A=09D00=5FeckDlk=2EI=7DFyU=2EZ?=)fD)Z/`.K\B\,?bVa#2XFv)g*sOJ*;/kB%*@ Subject: Re: ssh - restricted shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 21:51:27 -0000 On March 30, 2005 04:02 pm, Duane Winner wrote: > Hello, > > Does anybody know the best technique to accomplish this: > > We have a server that we use for mostly internal development, and run an > SSH server. > > We have an outsider who we want to allow to ssh into this server and do > some work. > > However, because he is an outsider, we don't want him roaming around our > server, moving, looking, doing, or anything outside of his own home > directory. > > How can I restrict him to his own home directory? > > I thought I ran into instructions once for doing this, but I can't find > anything right now. > > Or was I thinking of scponly ? > > That might do it, except we do need to set him up to to run some scripts > within his home directory after he uploads stuff via scp. if you only want scp to work, then you can use this as the shell: /usr/lib/misc/sftp-server worked for me. however, if they need a shell, you'll have to chroot() the shell and i don't know how to do that. i've never bothered to learn 'cause i've heard that they're easy to break out of anyway. -- the reasonable man adapts himself to the world; the unreasonable man persists in trying to adapt the world to himself. therefore, all progress depends on the unreasonable man. - george bernard shaw