Re: xhost

From: John Meyers (
Date: 05/30/02

Date: Thu, 30 May 2002 08:33:09 -0400
From: John Meyers <>
To: "Small, Jim" <>

 Jim, an ssh implementation would definitely be the prefered way to go.
 At that point, the admins shouldn't have to mess around with the DISPLAY
 variable or xauth, as it's configured for you automatically when you have
 X11 forwarding enabled.

 Although occassionally I've run into some applications that don't work
 exactly right (mostly Java based apps) when being tunnelled through an
 ssh session. For those occassions, I've setup a small script that
 basically copies the local xauthority keys to a remote host. It looks
 like this,

    #! /bin/sh
    LHOST=`uname -n`
    /usr/openwin/bin/xauth extract - $LHOST:0.0 | ssh $SHOST \
        '/usr/openwin/bin/xauth merge -'

 I have this in a script called 'xsauth'. Note this assumes you have ssh
 installed. If ssh isn't an option for some reason, just substitute 'rsh'
 for 'ssh' in the script. So if you were to perform some work on a remote
 host, you would first transfer over your current xauthority keys,

        xsauth remote-hostname
        Password: ...

 Then login into the remote host and set your DISPLAY back to your local
 host display.

 Hope this helps.


 John Meyers
 Computing Services
 Wright State University

Relevant Pages

  • ssh / keyless login problem
    ... OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f ... I am using rsync to backup my local host to a remote host over ssh. ... The first time the script runs after a long delay (ie overnight when the local ...
  • Re: which port(s) does the X server listen on?
    ... > but remote X clients are unable to display to it. ... things just quietly fail to display. ... Most of the time one would ssh to the box they want to run the ... If everything is setup ...
  • Re: ssh read from remote host xx.xx.xx.xx:Connection reset by peer
    ... The script does SSH in a loop and every few ... Connection closed by remote host. ...
  • Re: DECwindows over PuTTY
    ... I am using PuTTY to SSH to the emulated system. ... I am using Xming on Windows 7 as my display. ...
  • Re: Attempting to run remote X app
    ... > I'm attempting to ssh into a central server and run an X app, ... Make sure the ssh server is forwarding X connections: ... DISPLAY environment variable is set), the connection to the X11 display ...