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.
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: