X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=viE2xaaHJSvZtPfj 4tsq97FnLd1SIpPdL+Y+PRgFKCrUh3x2pvBnzeQKd99BCka5aa5n0m9qkbKER2zK OcNuobkNZYZo8ovnY6hJYLm1mVGyLSH7yITXWwqSPxT7q3a+TjgpFcJ5VedH6yjg sTul0LPMoKnT6jwRb+lZy37v8Os= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=QfSx0X9101/Sw3xNs+2RBE LGO5Y=; b=upipB75tY24eM24csjdN+euUt8CBAmQE8rwtJVYZ9z9Tu1tI/lXUDR 7qgUeEEiMHisgZttfJlQ/w3ZBRrmLh9Eq5k4OT1+3HoeZZOQaswB6RAaPNa5Ubij oqsk9E/z60U1aKsWg2kT0Y6gJbgzbvdnGJVMbXHj235l3mikAkJPI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPAM_BODY1 autolearn=no version=3.3.1 spammy= X-HELO: smtp-out-so.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: X11 forwarding request failed on channel 0 To: cygwin AT cygwin DOT com References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <946d38e2-eea7-0380-245f-9a73d3dfcf0c@SystematicSw.ab.ca> Date: Thu, 12 Sep 2019 09:04:19 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 2019-09-12 07:37, Haanraadts, Mark (HBO) via cygwin wrote: > I have a problem with remote ssh sessions to corporate Red Hat 6 servers and X11 forwarding. Xclock works perfectly fine on my local CYGWIn install. On a remote server I get: > $ xclock > Error: Can't open display: > > Here's the debug shell logfile: > > debug2: we sent a password packet, wait for reply > debug1: Authentication succeeded (password). > Authenticated to . > debug1: channel 0: new [client-session] > debug2: channel 0: send open > debug1: Requesting mailto:no-more-sessions AT openssh DOT com > debug1: Entering interactive session. > debug1: pledge: exec > debug2: channel_input_open_confirmation: channel 0: callback start > debug2: x11_get_proto: /usr/bin/xauth  list :0.0 2>/dev/null > debug1: Requesting X11 forwarding with authentication spoofing. > debug2: channel 0: request x11-req confirm 1 > debug2: fd 3 setting TCP_NODELAY > debug2: client_session2_setup: id 0 > debug2: channel 0: request pty-req confirm 1 > debug2: channel 0: request shell confirm 1 > debug2: channel_input_open_confirmation: channel 0: callback done > debug2: channel 0: open confirm rwindow 0 rmax 32768 > debug2: channel_input_status_confirm: type 100 id 0 > X11 forwarding request failed on channel 0 > debug2: channel_input_status_confirm: type 99 id 0 > debug2: PTY allocation request accepted on channel 0 > debug2: channel 0: rcvd adjust 2097152 > debug2: channel_input_status_confirm: type 99 id 0 > debug2: shell request accepted on channel 0 > Last login: Wed Sep 11 17:01:50 2019 from 10.218.16.112 > > Did a lot of Googling and I already changed this in /etc/ssh/sshd_config > X11Forwarding yes > AddressFamily inet > X11UseLocalhost no > > Here's how I'm starting X-Windows > startxwin & > sleep 10 > export DISPLAY=:0.0 > xhost + > xterm -sb -sl 5000 -geometry 168x17+380+0 -T "XTERM 1" & > xterm -sb -sl 5000 -geometry 168x17+380+315 -T "XTERM 2" & > xterm -sb -sl 5000 -geometry 168x16+380+600 -T "XTERM 3" & The Cygwin/X shortcut starts X window server with: run --quote /bin/sh -l -c "cd; exec /usr/bin/startxwin" You should not manually set DISPLAY - that is set by the X server - you should start clients from ~/.Xclients, or manually from your X desktop applications menu. DISPLAY=:0 or DISPLAY=:0.0 are only useful on implied localhost; you either have to use X11 forwarding: - on the command line ssh -X | -Y, or - enable that in ~/.ssh/config on a Host connection: ForwardX11 yes ForwardX11Trusted yes - note that untrusted client sessions are terminated after 20 minutes, or as per policy, and data returned may be zeroed or access attempts result in an error; if not using ssh forwarding, the DISPLAY value must be prefixed with a host name resolvable on the remote host to your local host. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple