
多くの設定ガイドと、より多くの「ディスプレイをオンにすることはできません。」エラー解決策に従いましたが、まだ問題が見つかりませんでした。まず、VPS Debian Squeezeにxserver-xorg-coreとxauthをインストールしました。
その後、Windows 7にxming 6.9.0.31をインストールしました。次に、putty 2012-11-09:r9690 を設定します。これはputty構成です。
VPSのsshd_configは次のように設定されます。
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
Xauthorityファイルは~/.Xauthority
。$DISPLAY
localhost:10.0
まず、xmingを起動してからputtyに接続します。
これを入力するxlogo
とError: Can't open display: localhost:10.0
。
xmingフォルダのx0.hostsにVPSのIPを入れました。 DISPLAYを私のIP(:0、localhost:0)に変更してみました。これらの組み合わせも覚えていません。 putty設定にlocalhost:0を入れてください。/etc/hosts
一つの答えで見たように、行の順序も変更しましたが、何の効果もありませんでした。
修正する: Putty イベントログは次のとおりです。
2013-03-03 15:58:14 Looking up host "IP"
2013-03-03 15:58:14 Connecting to IP port 22
2013-03-03 15:58:14 Server version: SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2
2013-03-03 15:58:14 Using SSH protocol version 2
2013-03-03 15:58:14 We claim version: SSH-2.0-PuTTY_Snapshot_2012_11_09:r9690
2013-03-03 15:58:14 Doing Diffie-Hellman group exchange
2013-03-03 15:58:14 Doing Diffie-Hellman key exchange with hash SHA-256
2013-03-03 15:58:15 Host key fingerprint is:
2013-03-03 15:58:15 ssh-rsa 2048 3f:6e:7d:6c:14:6a:3e:18:0d:d4:05:c9:b2:60:d3:00
2013-03-03 15:58:15 Initialised AES-256 SDCTR client->server encryption
2013-03-03 15:58:15 Initialised HMAC-SHA1 client->server MAC algorithm
2013-03-03 15:58:15 Initialised AES-256 SDCTR server->client encryption
2013-03-03 15:58:15 Initialised HMAC-SHA1 server->client MAC algorithm
2013-03-03 15:58:19 Sent password
2013-03-03 15:58:19 Access granted
2013-03-03 15:58:19 Opening session as main channel
2013-03-03 15:58:19 Opened main channel
2013-03-03 15:58:19 Requesting X11 forwarding
2013-03-03 15:58:20 X11 forwarding enabled
2013-03-03 15:58:20 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2013-03-03 15:58:20 Started a shell/command
他の場所で確認できますか?この問題を解決する方法はありますか?
答え1
Windowsファイアウォールがlocalhost:6010でTCPをブロックしていることを確認してください。
PuTTYを使用してSSHセッションを確立したら、次の簡単な手順を実行してリモートXサーバー(Xming)に接続できることを確認してください。ポートは、60xx
次に見つかるxx
のと同じ番号ですecho $DISPLAY
。
$ echo $DISPLAY
localhost:10.0
$ netstat -an | grep 6010
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp6 0 0 ::1:6010 :::* LISTEN
$ telnet 127.0.0.1:6010
telnet: could not resolve 127.0.0.1:6010/telnet: Name or service not known
$ telnet 127.0.0.1 6010
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
Xサーバーに接続できない場合は、次のことが発生します。
$ telnet 127.0.0.1 6011
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused