Re: Headless Ultra1, SSH and X11-forwarding
On Tue, 19 Jul 2005, F. Kappen wrote:
> Hi all,
> I installed Sarge (kernel 2.4.27) on my "Ultra1-headless". The machine
> has no console attached. I communicate with it via the serial port and
> over the net via SSH. From my desktop computer "Ultra1-desktop"-
> another Ultra1 running Solaris9 - I can connect to the headless machine
> and establish a X11-connection by manually setting the "DISPLAY"
> environment on the "Ultra1-headless" and allowing access with "+xhost"
> on my "Ultra1-desktop". But when I try to establish a secure
> X-connection via SSH
> desktop> ssh -X -v Ultra1-headless
> I always get the error message "Can't open Display".
If you are connecting via ssh and forwarding X packets, then don't use
+xhost (it's unneccessary) and DO NOT do a manual 'export display=XXX'
command - you're only interfering with ssh's ability to set things up.
> My question is, am I doing something wrong or is it impossible to
> establish a X-connection via SSH to a headless machine? I would like to
> hear from you.
On the target host (the one you're ssh'ing to) be sure that sshd_config is
set to enable:
On the source host (the one you're ssh'ing from) you can either do a
manual -X, or change the global ssh_config file to be as follows:
Not sure if the wording is different for various versions of ssh, just
search through the config files for X11 and probably uncomment the lines
and change the options from 'no' to 'yes'. Then bounce sshd on the target
Test it by ssh'ing to that host again and type 'env|grep display', you
should see something like the following:
If it's there - you're all done. Just start using x programs and you're