Home » Uncategorized » X11 forwarding

# Ensure /etc/ssh/sshd_config has the following options set:

X11Forwarding yes
X11DisplayOffset 10

# Install Xauth

RedHat: $ sudo yum install xauth
Debian: $ sudo apt-get install xauth

# Restart sshd

RedHat: $ sudo service sshd restart
Debian: $ sudo /etc/init.d/ssh restart

# Login to the remote host:

# Windows

# Ensure Xming is running first!

PuTTY:          Usual session options
Under Connection > SSH > X11
- Tick 'Enable X11 forwarding'
- Leave the Remote X11 authenication protocol as 'MIT-Magic-Cookie-1'
- No need to hardcode the X display location

# Linux

ssh -X user@host

# If this is the first time since installing xauth, you should see a message indicating a new authority file is created:

/usr/bin/xauth:  creating new authority file /<username>/.Xauthority

# Now connect to the remote host and X11 forwarding should work, eg:

REMOTE-HOST$ xeyes

The application running remotely should now be displayed on the local host, eg: your Windows machine with PuTTY and Xming.