Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't get Tiger X11 server to work via SSH

I am trying to get my Tiger system to "xterm" my Linux(2.6.9) box by tunneling/forwarding X11 traffic. No problem with connecting ("ssh -X <user@host>"), but the DISPLAY variable does not get set at all. ssh -Y doesn't work either. I've noticed that there is no DISPLAY variable in my Tiger terminals session and I have tried to manually set it ("export DISPLAY=localhost:0.0") but this does not work either; I get "connection refused" error message. I have no problem with ssh/X11 forwarding to the Linux box from other machines so I believe the problem lies with Tiger.

Oh yeah; X11Forwarding yes, Remote Login is turned on

I've Googled around and checked the boards here and have not found a solution.

What to do?

Posted on Oct 9, 2005 10:16 AM

Reply
10 replies

Oct 9, 2005 12:27 PM in response to Axeman15

IIRC you need to have ForwardX11 set to yes in both the sshd_config file and the ssh_config file. Once you've done this HUP the sshd process if it's running, I think that's about it.
One thing I learnt recently was that if you do set the DISPLAY manually and just use the export commands then the data isn't tunnelled.
If I understand you're question you are using your Mac to ssh into your GNU/Linux box and bringing the display back to your Mac. You are running X11 aren't you and not just trying to do it though a terminal? I'm just checking because you didn't say...
I think there are security options in X11 too but I couldn't find them when I went looking last time.

Richard

Oct 10, 2005 8:26 AM in response to Axeman15

As to the quest about display routing, the answer is yes, I want to display my GNU/Linux window on Tiger.


Hello Axeman15 I use ssh x11 forwarding between Tiger, Panther and linux machines without any problems. I have not manually set any display variables I just leave them as they are out of the box. I know this does not help you much however you may want to try resetting all your display variables to default.

I also upgraded to the most current stable release of openssh on my Tiger system.

Until you work this out have you considered using VNC?

But you should know that on day 1 of using Tiger none of my x11 forwarding would work using ssh -X, only ssh -Y would work sporadically.

I had a font issue with X11 and this caused a lot of forwarded X11 apps to crash.

To fix this font issue you can run this command in the terminal

b sudo fc-cache -f -v

Now that I have SSH X11 forwarding working correctly in Tiger you still have to use ssh -Y

Oct 11, 2005 11:52 AM in response to Axeman15

I have same issue. I've installed X11 on laptop Tiger 10.4. Display won't set.

Tried the instructions on OS/X site with no luck.

I used ssh -X, ssh -Y, tried to set DISPLAY=XXX.XX.XX.XX:0.0 ; export DISPLAY on remote system. No luck. Also I can't find xhost anywhere. I was told OS10.4 changed the way it uses some network stuff I.E. xinetd now instead of inetd could this be a reason?

Oct 11, 2005 12:05 PM in response to Axeman15

UPdate: I was su'ing to root before I tried the ssh commands. Other ssh commands worked fine. I remembered AIX had a problem with root ssh'ing as root. Had to be a regular user and ssh root@"hostname" in order to make it work. When I generated my host keys as a regular user. I.E.:
log in to local MAC as regular user mdcarroll:

ap215672:~ mcarroll> ssh -X root@"remote host"
passwd>
remote_host# nwadmin

GUI displays on my MAC correctly now.

Nov 14, 2005 1:36 PM in response to Axeman15

I am also having this problem in 10.4.3 -- X11 forwarding will not work at all. I have enabled X11 forwarding in the config files (both sshd and ssh config).

I have attempted to securely log in to four or five systems using various options: for instance the -Y switch, the -X switch, even both together, but no dice.

I'm not only attempting to connect to Macs but also BSD and Linux systems.

When I run -v (verbose) here is the out put I receive--note that SSH makes absolutely no mention of even attempting to set up an X11 forward:

---------------
powerbook:~ mark$ ssh -Y -v root@mediabox

OpenSSH_3.8.1p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /Users/mark/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to mediabox [192.168.1.75] port 22.
debug1: Connection established.
debug1: identity file /Users/mark/.ssh/identity type -1
debug1: identity file /Users/mark/.ssh/id_rsa type 1
debug1: identity file /Users/mark/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug1: An invalid name was supplied
Configuration file does not specify default realm

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: An invalid name was supplied
Configuration file does not specify default realm

debug1: An invalid name was supplied
A parameter was malformed
Validation error

debug1: SSH2 MSGKEXINIT sent
debug1: SSH2 MSGKEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2 MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
debug1: expecting SSH2 MSG_KEX_DH_GEXGROUP
debug1: SSH2 MSG_KEX_DH_GEXINIT sent
debug1: expecting SSH2 MSG_KEX_DH_GEXREPLY
debug1: Host 'mediabox' is known and matches the RSA host key.
debug1: Found key in /Users/mark/.ssh/known_hosts:6
debug1: ssh rsaverify: signature correct
debug1: SSH2 MSGNEWKEYS sent
debug1: expecting SSH2 MSGNEWKEYS
debug1: SSH2 MSGNEWKEYS received
debug1: SSH2 MSG_SERVICEREQUEST sent
debug1: SSH2 MSG_SERVICEACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/mark/.ssh/identity
debug1: Offering public key: /Users/mark/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
Last login: Mon Nov 14 15:52:46 2005 from 192.168.1.1

mediabox ~ #
---------------

Also, I should mention that I can ssh out of my mediabox running Gentoo with the -X switch and it works fine on my macs, properly setting up the $DISPLAY variable. Weird. I think that ssh is badly broken in Tiger...

Your insight would be appreciated.

Thanks
Mark

Jan 7, 2006 2:44 PM in response to babazoid

Hi Folks,

Sorry if this is something you've already checked out, but I was having the same problem (almost identical -v output) and managed to get it working. I found I couldn't use ssh -X -Y from my regular terminal window, but it would work if the command was issued in the xterm window that X11.app opens. I can see all my linux stuff from my mac with properly displayed windows...

Only problem now is the speed it runs at - dog slow doesn't describe it! ; )

Cheers.

Jan 16, 2006 7:22 AM in response to Axeman15

've noticed that there is no DISPLAY variable in my Tiger terminals session and I have tried to manually set it ("export DISPLAY=localhost:0.0") but this does not work either;

This is your problem. You have already noticed that only xterm sessions launched from the X11 application get they DISPLAY variable set. If you want to work with X11 and the Terminal.app application, you have to set it manually. However, for a reason or another, you must NOT set it to "localhost:0.0", but to "😮.0".

On my system :
FlyingPig:~ cochonou$ export DISPLAY="localhost:0.0"
FlyingPig:~ cochonou$ xeyes
Error: Can't open display: localhost:0.0

FlyingPig:~ cochonou$ export DISPLAY="😮.0"
FlyingPig:~ cochonou$ xeyes
xeyes is OK.

If you want to do this configuration automatically, put it in the .bash_profile file in your home directory.

Now if you followed the advices of the other users in this thread, ssh -Y or -X should set the display variable correctly on the remote machine, and X11 forwarding should work.

Jan 16, 2006 7:54 AM in response to Axeman15

've noticed that there is no DISPLAY variable in my Tiger terminals session and I have tried to manually set it ("export DISPLAY=localhost:0.0") but this does not work either;

This is your problem. You have already noticed that only xterm sessions launched from the X11 application get they DISPLAY variable set. If you want to work with X11 and the Terminal.app application, you have to set it manually. However, for a reason or another, you must NOT set it to "localhost:0.0", but to "😮.0".

On my system :
FlyingPig:~ cochonou$ export DISPLAY="localhost:0.0"
FlyingPig:~ cochonou$ xeyes
Error: Can't open display: localhost:0.0

FlyingPig:~ cochonou$ export DISPLAY="😮.0"
FlyingPig:~ cochonou$ xeyes
xeyes is OK.

If you want to do this configuration automatically, put it in the .bash_profile file in your home directory.

Now if you followed the advices of the other users in this thread, ssh -Y or -X should set the display variable correctly on the remote machine, and X11 forwarding should work.

Can't get Tiger X11 server to work via SSH

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.