Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Ubuntu 13.04 in VM and I wanted to do X11 forwarding to my host (Win 8), so far it works fine using PuTTY and XMing server for Windows.

But I am curious why it doesn't work if I use OpenSSH binaries (it comes together with Git for windows).

This is what I've done so far:

ssh -X shulhi@192.168.2.3 (also tried with -Y) then gedit but received error of Cannot open display. echo $DISPLAY came out as empty. So, I try to export DISPLAY=localhost:0.0 but it still won't work. The DISPLAY environment that I set is exactly as when it runs with Putty.

I also try changing the DISPLAY to 192.168.2.3:0.0 and other display number as well, but still it won't work.

Of course I could just use Putty to make it work, but I was wondering why OpenSSH binaries does not work.

I have enabled all settings required in both /etc/ssh/ssh_config and /etc/ssh/sshd_config.

If I run with -v option, this is what I get

F:\SkyDrive\Projects> ssh -X -v shulhi@192.168.2.3
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to 192.168.2.3 [192.168.2.3] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Shulhi/.ssh/identity type -1
debug1: identity file /c/Users/Shulhi/.ssh/id_rsa type -1
debug1: identity file /c/Users/Shulhi/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.1p1 Debian-4
debug1: match: OpenSSH_6.1p1 Debian-4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.2.3' is known and matches the RSA host key.
debug1: Found key in /c/Users/Shulhi/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/Shulhi/.ssh/identity
debug1: Trying private key: /c/Users/Shulhi/.ssh/id_rsa
debug1: Next authentication method: password
shulhi@192.168.2.3's password:

It seems that there is no request for X11 (I'm not sure if there is should be one too here).

Any pointers why it doesn't work?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.