From owner-freebsd-questions@FreeBSD.ORG Thu Jan 20 09:30:17 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 C2B671065673 for ; Thu, 20 Jan 2011 09:30:17 +0000 (UTC) (envelope-from ibrahim.harrani@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0AD8FC13 for ; Thu, 20 Jan 2011 09:30:17 +0000 (UTC) Received: by iwn39 with SMTP id 39so362599iwn.13 for ; Thu, 20 Jan 2011 01:30:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=nSqQNlCe3Amsv7wwg2PHNG8cbZC10SUehKDaBtHITX0=; b=ftUnQ1drpgzYrJZQxJ5Fq6dqUZc1qynScQowc0y6NdNcqG/MKBnQ6ODxSvakWrwo3K 6v/osVEd/9tRfCmQTLJDD+WRmqeJQQ1jA8N+sKDb5BKLZJeF6IJ3SWUA12lhqYVU5c6J 3ACq64/fpbgO5qPUYY9MUoiUPOD8phztde4o0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fmREDBcJX7LFZsWKsTd34SHhm8MlGWPwc3q90lfTPGuIGIuqgs1gv38548gB4tblb3 W66fWglHJ6igtAkGt13tMvAK5y6NMuPLxsRu0FUuY5ycopoixBBs5hidiHiIdfLW1fRm jSqQv4WUj9hJeMe3rfBkIr35i6NiLcpU7Vtxo= MIME-Version: 1.0 Received: by 10.42.218.136 with SMTP id hq8mr2221076icb.379.1295514390829; Thu, 20 Jan 2011 01:06:30 -0800 (PST) Received: by 10.42.165.66 with HTTP; Thu, 20 Jan 2011 01:06:30 -0800 (PST) Date: Thu, 20 Jan 2011 11:06:30 +0200 Message-ID: From: Ibrahim Harrani To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: chrooted ssh user and /dev/tty permission denied 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: Thu, 20 Jan 2011 09:30:17 -0000 Hi, I have a problem with making remote ssh connection in chroot env. I configured chroot in sshd_config on FreeBSD 8.1 like following. Match user myuser ChrootDirectory /opt/root/myuser X11Forwarding no AllowTcpForwarding no RSAAuthentication yes PubkeyAuthentication yes and configured fstab like following. devfs /opt/root/myuser/dev devfs rw 0 0 and rc.conf devfs_set_rulesets="/opt/root/myuser/dev=devfsrules_jail I copied all binaries and libs (such as ssh,ls,pwd,ftp,scp) also. I can make ssh connection with this user to chroot enviorment successfully. When I tried to make a ssh/scp/sftp connection to remote box in chroot. I got "cannot open /dev/tty: permission denied" message. The permission of /dev/tty is following on chroot's /dev directory crw--w---- 1 root tty 0, 88 Jan 20 11:02 /dev/tty I tired to change permission as root from out of the chroot by chmod, the permission never change. What should I do to make a remo ssh conn inside of the chroot env? Thanks.