mac下ssh打开X11转发

mac下ssh打开X11转发

1.首先确认linux下已开启X11转发:

```
sudo vim /etc/ssh/sshd_config

X11Forwarding yes
X11DisplayOffset 10

service ssh restart
```

2.安装XQuartz

3.在mac端下开启:

```bash
sudo vim /etc/ssh/ssh_config

ForwardX11 yes
```

4.ssh登陆

```bash
ssh -X username@ip
```