Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2002 03:30:36 +0100 (CET)
From:      Morten Grunnet Buhl <nemo@rudiment.dk>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: ssh within jail ?
Message-ID:  <Pine.LNX.4.31.0202240321390.20595-100000@rudiment.dk>
In-Reply-To: <00c401c1bcc0$28965c90$0800a8c0@master>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.31.0202240321390.20595-100000>