From owner-freebsd-questions@freebsd.org Wed Apr 5 14:25:30 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 936B2D30AEC for ; Wed, 5 Apr 2017 14:25:30 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from inet08.hamilton.harte-lyne.ca (inet08.hamilton.harte-lyne.ca [216.185.71.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "inet08.hamilton.harte-lyne.ca", Issuer "CA_HLL_ISSUER_2016" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 53105D85 for ; Wed, 5 Apr 2017 14:25:30 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from localhost (localhost [127.0.0.1]) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTP id 55E1562276 for ; Wed, 5 Apr 2017 10:25:23 -0400 (EDT) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from inet08.hamilton.harte-lyne.ca ([127.0.0.1]) by localhost (inet08.hamilton.harte-lyne.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wxp7lT74RZT0 for ; Wed, 5 Apr 2017 10:25:12 -0400 (EDT) Received: from webmail.harte-lyne.ca (inet04.hamilton.harte-lyne.ca [216.185.71.24]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTPSA id D7F6E621E3 for ; Wed, 5 Apr 2017 10:25:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1491402312; bh=Wez9BcyG4KTdufx6Uq2nTFIgG8CtaCVb6teNdtPykvU=; h=In-Reply-To:References:Date:Subject:From:To:Reply-To; b=e5CPJ7dboYlTi1bHiAHAmwGfWdCRD2qj/1Br9O0ZIWcCuuI2fdU3p4pfqxF1sEPRF eyIucFm5YCdOAennu9LGrXFiOEuqx3zbIr6EbeErBhsZOBZWuCa+ksD88HhlPha1Lq rEIrNkC0QOCmK8dMfUBin2iaOWkXmm8VLK0jir6l3hzSWVDxDc3hJvBzpInnPlaznp PBi2oVoYroo19BIEADGcVMm+IGupN1t95fTouiD+iCkoT9nXma7KZuUp/ofcLtZ8t+ zj86JE7n0OmqtGNmkhwrf5aXcXNOkkwBfn6siRHxkFR4GZB5dkj7SVbhkkdk8SS2CP LlA0z8bql43AA== Received: from 216.185.71.44 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Wed, 5 Apr 2017 10:25:12 -0400 Message-ID: In-Reply-To: <20170331204517.f30e0f3b.freebsd@edvax.de> References: <7f49f81e25d0eb05aad1af66df49c525.squirrel@webmail.harte-lyne.ca> <20170331204517.f30e0f3b.freebsd@edvax.de> Date: Wed, 5 Apr 2017 10:25:12 -0400 Subject: Re: X11 and ezjails From: "James B. Byrne" To: freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.22-4.el6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 14:25:30 -0000 On Fri, March 31, 2017 14:45, Polytropon wrote: > On Fri, 31 Mar 2017 13:39:29 -0400, James B. Byrne via > freebsd-questions wrote: >> I would like to run gvim in an X11 window over ssh to a jailed >> instance created with ezjail. I have set sshd_config in the jail to >> allow X11Forwarding and I am connecting with 'ssh -Y >> jail.domain.tld' >> >> However, when I log into the jail and run gvim then I see this: >> >> # gvim >> X11 connection rejected because of wrong authentication. >> E233: cannot open display >> Press ENTER or type command to continue >> >> E852: The child process failed to start the GUI >> X11 connection rejected because of wrong authentication. >> >> >> I have run into this before and have attempted to apply all of the >> previous remedies but nothing seems to work. Is there anything >> about jails themselves that would prevent X11 forwarding? > > Just a very stupid question: You _did_ set $DISPLAY as needed? > See "man ssh", section X11 FORWARDING. > > echo $DISPLAY localhost:10.0 I have this in the local host's ssh_config: Host * GSSAPIAuthentication yes # If this option is set to yes then remote X11 clients will # have full access to the original X11 display. As virtually # no X11 client supports the untrusted mode correctly we set # this to yes. ForwardX11Trusted yes ForwardAgent yes # Send locale-related environment variables SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE SendEnv LC_MONETARY LC_MESSAGES SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE SendEnv XMODIFIERS Protocol 2 I have this in the remote host jail /etc/ssh/sshd_config: GatewayPorts no AllowTcpForwarding yes KeepAlive yes IgnoreRhosts yes Banner /etc/ssh/ssh_pre_logon.txt IgnoreUserKnownHosts no PrintMotd yes StrictModes yes PubkeyAuthentication yes RSAAuthentication no PermitRootLogin without-password PermitEmptyPasswords no X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes I connect using this: ssh 192.168.209.33 -t -X 'bash || sh' When I attempt to run gvim over a session created with the above ssh command then I get this gvim X11 connection rejected because of wrong authentication. E233: cannot open display Press ENTER or type command to continue E852: The child process failed to start the GUIX11 connection rejected because of wrong authentication. I only encounter this on jailed instances on the remote host. On the remote host itself gvim works over ssh connections without difficulty. I regret the delay in returning to this issue but other matters proved more pressing in the meantime. Any ideas respecting resolving this are most welcome. -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3