# Ssh X11 forwarding

**URL:** <https://linux-tips.com/t/ssh-x11-forwarding/155>\
**Category:** Network\
**Created:** [April 17, 2008, 11:39am UTC](https://linux-tips.com/t/ssh-x11-forwarding/155 "2008-04-17T11:39:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsenyurt](https://linux-tips.com/user_avatar/linux-tips.com/tsenyurt/32/200_2.png) [@tsenyurt](https://linux-tips.com/u/tsenyurt)\
**Post date:** [April 17, 2008, 11:39am UTC](https://linux-tips.com/t/ssh-x11-forwarding/155/1 "2008-04-17T11:39:08Z")

</div>

First make sure that your binary distro of ssh has X11 forwarding support.

Commonly it will. But on very old systems you must upgrade it or rebuild the source tree removing ant X11 disabling funtions.

On the server side, you must enable X11 forwarding by editting the `/etc/ssh/sshd_config` file and adding a line

```
AllowX11Forwarding yes

```

On client side we must inform ssh client to give that support so that we must edit either `/etc/ssh/ssh_config` or the user own ssh config file `~/.ssh/config` file by adding a line:

```
ForwardX11 yes

```

If you don’t want to use X11 forwarding by default at the client side, you can also turn on forwarding with `-X` option:

```
ssh -X username@hostname
```
