From owner-freebsd-questions Sat Feb 23 18:21:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.rudiment.dk (rudiment.egmont-kol.dk [130.225.237.12]) by hub.freebsd.org (Postfix) with ESMTP id 6A30C37B400 for ; Sat, 23 Feb 2002 18:21:35 -0800 (PST) Received: by mail.rudiment.dk (Postfix, from userid 104) id 3406A11FBE; Sun, 24 Feb 2002 03:30:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.rudiment.dk (Postfix) with ESMTP id 299A111EF3 for ; Sun, 24 Feb 2002 03:30:36 +0100 (CET) Date: Sun, 24 Feb 2002 03:30:36 +0100 (CET) From: Morten Grunnet Buhl Reply-To: Morten Grunnet Buhl To: Subject: RE: ssh within jail ? In-Reply-To: <00c401c1bcc0$28965c90$0800a8c0@master> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 23 Feb 2002, Jonas Fornander wrote: > What do I have to do to define a jail in rc.conf? > > I have sshd_enable="YES" in rc.conf and the users can login with ssh and > cd to anywhere on the system. I want the users to be jailed in their > home directory when they use ssh. Is that possible? - you have to add sshd_enable="YES" in the jails rc.conf This is how Ive done it: #/etc/rc.cong (host environment) ... ifconfig_xl0="inet 10.0.0.3 netmask 255.255.255.0" inetd_flags="-wW -a 10.0.0.3" inetd_enable="YES" sshd_enable="YES" ... #/jail/10.0.0.5/etc/rc.conf (jail environment) ... network_interfaces="" sshd_enable="YES" portmap_enable="NO" ... This will make me capable of sshing to 10.0.0.5. If sshd_enable="YES" is not in the jail rc.conf an ssh attemt on 10.0.0.5 will bi redirected to 10.0.0.3 - this is proberly what is happening to you. Hope this helps, Morten. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message