This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: ssh tunnel x session - solution
- From: Cary Lewis <clewis at mobilecom dot com>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Tue, 10 Dec 2002 16:45:25 -0500
- Subject: RE: ssh tunnel x session - solution
I was having a problem using Xfree and ssh under cygwin.
I want to be able to run a xterm session on a remote cygwin machine on the X
server running on my local cygwin machine.
I can ssh into the remote machine with no problem, and I get an .Xauthority
file, the problem is that the entry has the machine name in CAPITALS, which
causes problems for the X apps.
The following ~/.ssh/rc script fixes the problem, with thanks to Olivier
Baudron:
PATH=$PATH:/usr/X11R6/bin;export PATH
if read proto cookie; then
m=`echo $COMPUTERNAME|tr "[:upper:]" "[:lower:]"`
x=`echo -n $DISPLAY | sed -e s/:/\\\\/unix:/|sed -e s/localhost/$m/`
xauth -q add $x $proto $cookie
xauth list
fi
What is strange, is that if you just do a xauth -q $DISPLAY $proto $cookie
then you get an entry that has the machine name in lowercase but without the
/unix.
BTW, I am still having trouble getting this to work on a SCO unix base,
xauth list looks correct, but I always get:
debug1: confirm x11
debug1: X11 connection uses different authentication protocol.
X11 connection rejected because of wrong authentication.
debug1: X11 rejected 1 i0/o0
Very annoying.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/