Questions about ssh (xauth) 

Newsgroups: comp.unix.shell
>I've heard a lot about ssh can set DISPLAY variable automatically but
>never saw it happened until I set up ssh server on my linux box. The
>problem was none of the unix box in my univ. worked, including all the
>boxes in our lab that I take care of. I got the message:
>
>Warning: Remote host denied X11 forwarding, perhaps xauth program could not be
>run on the server side.
>
>what could be wrong? How to fix it? I checked that xauth is right there in the
>path.

But is it in the path that ssh has on the remote machine _before_ it spawns your login shell?

Read the manual page for sshd and either set up your $HOME/.ssh/environment files with PATH settings which can find xauth, or set up your $HOME/.ssh/rc file to do the xauth for sshd.

Questions about ssh (xauth) 

man sshd

CONFIGURATION FILE

Sshd reads configuration data from /etc/sshd_config (or the file specified with -f on the command line). The file contains keyword-value pairs, one per line. Lines starting with '#' and empty lines are interpreted as comments.

LOGIN PROCESS

When a user successfully logs in, sshd does the following:

  1. If the login is on a tty, and no command has been specified, prints last login time and /etc/motd (unless prevented in the configuration file or by $HOME/.hushlogin; see the FILES section).
  2. If the login is on a tty, records login time.
  3. Checks /etc/nologin; if it exists, prints contents and quits (unless root).
  4. Changes to run with normal user privileges.
  5. Sets up basic environment.
  6. Reads /etc/environment if it exists.
  7. Reads $HOME/.ssh/environment if it exists.
  8. Changes to user's home directory.
  9. If $HOME/.ssh/rc exists, runs it (with the user's shell); else if /etc/sshrc exists, runs it (with /bin/sh); otherwise runs xauth. The "rc" files are given the X11 authentication protocol and cookie in standard input.
  10. Runs user's shell or command.