Default settings in Ubuntu hardy are X11 forwarding enabled, because of the X11Forwarding is set to yes.
If the configuration file modified, please reload sshd using "/etc/init.d/ssh restart" command.
Parameters must added when client-side using ssh command to connect remote host, two commands below will establishing X11 forwarding connection.
- ssh -Y user@remote_hostname
- ssh -X -C user@remote_hostname
-X Enables X11 forwarding.
-Y Enables trusted X11 forwarding.
-C Requests compression of all data.
If something was wrong, there will be some error messages when execute X11 applications on remote host, like "xclock", messages maybe like:
Error: no display specified
To solve this problem, using "ssh -X -v user@remote_hostname" to show all debug messages. This provide information like:
debug1: Remote: No xauth program; cannot forward with spoofing.
The sample error message tell us need to install "xauth" on remote host. It's a program X11 forward required. Just type "apt-get install xauth" to perform installation.