Код: Выделить всё
ssh 11.22.33.44 -p 22 -l user -CXY
Пытаюсь запустить X-приложение -- получаю ошибку:
Код: Выделить всё
$ opera
X11 connection rejected because of wrong authentication.
opera: cannot connect to X server localhost:10.0. Error: Ресурс временно недоступен
$ mousepad
X11 connection rejected because of wrong authentication.
(mousepad:6704): Gtk-WARNING **: cannot open display: localhost:10.0
При том что на сервере
Код: Выделить всё
$ ls -l .Xauthority
-rw------- 1 user user 1620 Авг 26 19:39 .Xauthority
в файле /etc/ssh/sshd_config
Код: Выделить всё
X11Forwarding yes
и на локальной машине в файле /etc/ssh/sshd_config
Код: Выделить всё
X11Forwarding yes
Если на удалённой машине выполнить
Код: Выделить всё
export DISPLAY=0.0
то ошибка не исчезает:
Код: Выделить всё
$ mousepad
(mousepad:7103): Gtk-WARNING **: cannot open display: 0.0
Локальная машина -- Ubuntu 10.04, удалённая -- Debian Squeeze. Дебиан-хост находится за роутером D-Link DIR-300, в настройках роутера хост (IP 192.168.0.100 в логе ниже) вынесен в DMZ (Demilitarized Zone).
Что я делаю не так?
Вот ещё немного логов при подключении по SSH с параметром -v:
Код: Выделить всё
$ ssh 11.22.33.44 -p 22 -l user -CXYv
OpenSSH_5.3p1 Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009
debug1: Connecting to 11.22.33.44 [11.22.33.44] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4
debug1: match: OpenSSH_5.5p1 Debian-4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 zlib@openssh.com
debug1: kex: client->server aes128-ctr hmac-md5 zlib@openssh.com
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 '[11.22.33.44]:22' is known and matches the RSA host key.
debug1: Found key in /home/user/.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: /home/user/.ssh/identity
debug1: Trying private key: /home/user/.ssh/id_rsa
debug1: Trying private key: /home/user/.ssh/id_dsa
debug1: Next authentication method: password
user@11.22.33.44's password:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
Linux debian-0 2.6.32-3-686 #1 SMP Thu Feb 25 06:14:20 UTC 2010 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Sat Sep 11 21:03:54 2010 from 10.222.**.**
user@debian-0:~$ opera
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 192.168.0.100 43319
debug1: channel 1: new [x11]
debug1: confirm x11
X11 connection rejected because of wrong authentication.
debug1: channel 1: free: x11, nchannels 2
opera: cannot connect to X server debian-0:10.0. Error: Ресурс временно недоступен