[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Запуск приложенией X-window через ssh



> А вот затем, что сервер НЕ ЗНАЕТ от чьего имени запущен клиент, который
> к нему коннектится через сокет. Протокол ident в природе, конечно,
> существует, но доверять ему ни на грош не доверяют почти что с самого
> основания. Поэтому для коннекта к локальному дисплею требуется точно
> такая же кука, как и при коннекте к удаленному.

Да требуется. Только ручками это куку туда класть не надо и xauth
запускать тоже. Если ssh сервер правильно настроен, то он от клиента,
по-моему, ее получает, запускает xauth сам и скармливает ей все это дело.

Вот часть мана по sshd:

LOGIN PROCESS

...

8.   If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc
     exists, runs it; otherwise runs xauth.  The ``rc'' files are
     given the X11 authentication protocol and cookie in standard
     input.

...

$HOME/.ssh/rc
     If this file exists, it is run with /bin/sh after reading the
     environment files but before starting the user's shell or com-
     mand.  It must not produce any output on stdout; stderr must be
     used instead.  If X11 forwarding is in use, it will receive the
     "proto cookie" pair in its standard input (and DISPLAY in its
     environment).  The script must call xauth(1) because sshd will
     not run xauth automatically to add X11 cookies.

--
  Макс



Reply to: