From owner-freebsd-questions@freebsd.org Tue Dec 11 16:32:16 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CABD7133722C for ; Tue, 11 Dec 2018 16:32:16 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from mx32.harte-lyne.ca (mx32.harte-lyne.ca [216.185.71.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx32.harte-lyne.ca", Issuer "CA_HLL_ISSUER_2016" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B50C7F4E4 for ; Tue, 11 Dec 2018 16:32:16 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from mx32.harte-lyne.ca (unknown [127.0.32.1]) by mx32.harte-lyne.ca (Postfix) with ESMTP id C08561D49F; Tue, 11 Dec 2018 11:32:15 -0500 (EST) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from mx32.harte-lyne.ca ([127.0.32.1]) by mx32.harte-lyne.ca (mx32.harte-lyne.ca [127.0.32.1]) (amavisd-new, port 10024) with ESMTP id Bx89uSt9aGYL; Tue, 11 Dec 2018 11:32:06 -0500 (EST) Received: from webmail.harte-lyne.ca (mx32.harte-lyne.ca [216.185.71.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx32.harte-lyne.ca (Postfix) with ESMTPSA id BCA691D494; Tue, 11 Dec 2018 11:32:05 -0500 (EST) Received: from 216.185.71.44 (SquirrelMail authenticated user byrnejb_hll) by webmail.harte-lyne.ca with HTTP; Tue, 11 Dec 2018 11:32:05 -0500 Message-ID: <109f3022fa5d61d76e455571461e30a1.squirrel@webmail.harte-lyne.ca> In-Reply-To: References: Date: Tue, 11 Dec 2018 11:32:05 -0500 Subject: Re: frebsd jails advice From: "James B. Byrne" To: "Andrea Venturoli" Cc: freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Rspamd-Queue-Id: 1B50C7F4E4 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.48 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[byrnejb@harte-lyne.ca]; RBL_COMPOSITE_RCVD_IN_DNSWL_MED_DWL_DNSWL_LOW(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:216.185.71.0/26]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; MX_GOOD(-0.01)[cached: mx32.harte-lyne.ca]; DKIM_TRACE(0.00)[harte-lyne.ca:+]; RCPT_COUNT_TWO(0.00)[2]; HAS_X_PRIO_THREE(0.00)[3]; DMARC_POLICY_ALLOW(-0.50)[harte-lyne.ca,quarantine]; RCVD_IN_DNSWL_MED(-0.20)[32.71.185.216.list.dnswl.org : 127.0.4.2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:12021, ipnet:216.185.64.0/20, country:CA]; IP_SCORE(-3.78)[ip: (-9.91), ipnet: 216.185.64.0/20(-4.95), asn: 12021(-3.96), country: CA(-0.09)]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[harte-lyne.ca:s=dkim_hll]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_LOW(0.00)[harte-lyne.ca.dwl.dnswl.org : 127.0.4.1]; TO_MATCH_ENVRCPT_SOME(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 16:32:17 -0000 On Tue, December 11, 2018 09:45, Andrea Venturoli wrote: > On 12/11/18 3:23 PM, James B. Byrne via freebsd-questions wrote: > >> When I asked about this on this list I recall >> being told that jails simply do not support X-windowing as a client. > > Don't know about gvim, but I'm sure this is completely wrong in > general, > as I'm doing this right now (and have been regularly doing it for some > years). I run xterm, emacs, gnuplot, ... > > Do you have xauth installed in the jail? No. But I do now. > Does it work with "ssh -Y"? No. The error has changed however. [root@hll124 ~]# gvim X11 connection rejected because of wrong authentication. > Anything in the logs? Not that I can see. nothing in messages, auth.log, security, userlog. > What about ssh_config and sshd_config? Both the client host and the jail have pretty much the same settings. # Local overrides AllowTcpForwarding yes Banner /etc/ssh/ssh_pre_logon.txt GatewayPorts yes IgnoreRhosts yes IgnoreUserKnownHosts no KeepAlive yes LoginGraceTime 60 PermitEmptyPasswords no PermitRootLogin without-password PrintMotd yes PubkeyAuthentication yes StrictModes yes ChallengeResponseAuthentication no MaxAuthTries 6 PasswordAuthentication yes Protocol 2 > > Is your jail local? I'm talking about jails on remote systems (as the > OP did). Perhaps it's a limitation of *local* jails? I admin I never > tried this... > The jail I am testing with runs as a jail on my desktop. I run ssh from a mate terminal that I have switched to root using 'su -m' before running 'ssh -Xt hll124'. However, I get exactly the same result if I connect over ssh from a mate terminal using my normal userid. $ ssh -X hll124 . . . $ gvim X11 connection rejected because of wrong authentication. E233: cannot open display I have also installed xauth and vim on a separate jail running on another host and achieve the same results. If there is some other step required then I would appreciate being told what I am missing. When I asked about this before this is what I was told: https://lists.freebsd.org/pipermail/freebsd-questions/2017-April/276842.html > This is the problem > E233: cannot open display > > gvim will not work if run in a jail. gvim uses x11 and x11 > needs kernel access to talk to the x11 display. Jails are > designed on purpose to deny kernel access to secure the host > system from attack. This is why you can never get a desktop > to run in a jail. The other authentication error messages > are bogus and can be ignored as misleading. > > This is also why gvin works when run on the host system. > > The bottom line here is that what your trying to run in a jail > will NEVER work. Ezjail has no baring on this problem, its a > design feature of jsil(8). -- *** 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