SSH -X doesn't work without an export DISPLAY

Ray Stell stellr at cns.vt.edu
Mon Jul 9 12:13:27 UTC 2007


forgive me, I've not been following this thread, so I don't
even know which direction you are trying to go with this, but
I thought I'd throw this in.  I do display X from sun to rh using
openssh.  

On rh we have the stock rpms:

$ rpm -qa | grep ssh
openssh-server-3.9p1-8.RHEL4.20
openssh-3.9p1-8.RHEL4.20
openssh-askpass-gnome-3.9p1-8.RHEL4.20
openssh-askpass-3.9p1-8.RHEL4.20
openssh-clients-3.9p1-8.RHEL4.20

I even alias the ssh command to be ssh -Y

$ alias
alias catalina.sh='/usr/java/apache-tomcat-5.5.20/bin/catalina.sh'
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=never'
alias ssh='ssh -Y'


On solaris, I have openssh installed and use it instead of 
the stock version:

$ which ssh
/usr/local/openssh/bin/ssh

$ ssh -V
OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep 2006

Display from sun to rh works every time.  I don't know 
that I've ever tried the other way, however.

HTH.





On Mon, Jul 09, 2007 at 02:05:40PM +0200, Michel Dubois wrote:
> Last question, 
> 
> I readed that the Xforward used the 6010 TCP port. On my red hat this port is 
> not open. 
> user at SUNserver :~$ ssh -X redhat 
> Last login: Mon Jul  9 11:48:58 2007 from SUNserver
> [user at redhat ~]$ telnet localhost 6010
> Trying 10.0.2.7...
> telnet: connect to address 10.0.2.7: Connection refused
> telnet: Unable to connect to remote host: Connection refused
> 
> And when I try to do a "xhost +SUNserver" on my redhat, I got :
> xhost:  unable to open display "localhost:12.0"
> 
> any Idea
> Thanks in advance.............. 
> 
> 
> 
> On Monday 09 July 2007 13:24:50 you wrote:
> > A great help will be the ssh+sshd config. files, sshd daemon startup
> > parameters, in general sshd specification + security from your x display
> > server.Not to be solved easy, this one, needs research, at least for me.
> >
> > On Mon, 2007-07-09 at 10:33 +0200, Michel Dubois wrote:
> > > On Saturday 07 July 2007 10:36:15 harold molly wrote:
> > > > Is there specific configuration required to connect to the
> > > > ssh daemon on the destination server, solaris sshd man page?
> > >
> > > As the "ssh -Y" is not supported by the ssh client  of SUN, I don't know
> > > how to do.
> > > I think, there is a problem with the authorization cookies.
> > > I forward you an extract of the ssh man page about the Xforwarding :
> > >
> > > User Commands                                              ssh(1)
> > >
> > >      -X    Enables X11 forwarding. This can also be specified  on
> > >            a per-host basis in a configuration file.
> > >
> > > ENVIRONMENT VARIABLES
> > >      ssh will normally set the following environment variables:
> > >
> > >      DISPLAY
> > >            The DISPLAY variable indicates the location of the X11
> > >            server.  It  is automatically set by ssh to point to a
> > >            value of the form hostname:n where hostname  indicates
> > >            the  host  where  the  shell runs, and n is an integer
> > >            greater than or equal to  1.  ssh  uses  this  special
> > >            value to forward X11 connections over the secure chan-
> > >            nel. The user should normally not set  DISPLAY  expli-
> > >            citly, as that will render the X11 connection insecure
> > >            (and will  require  the  user  to  manually  copy  any
> > >            required authorization cookies).
> > >
> > > I tried this command on Red Hat server but it doesn't work :
> > > xauth add `echo "${DISPLAY}" | sed 's/.*\(:.*\)/\1/'` . `mcookie`
> 
> 
> 
> -- 
> Cordialement.
> ----------------------
> Michel Dubois
> Ing??nieur Support CIMPACA
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list




More information about the redhat-sysadmin-list mailing list