macOS无法打开X11图形?

在macOS系统中用vpn登陆linux服务器后出现这样的提示:

Warning: untrusted X11 forwarding setup failed: xauth key data not generated

且无法打开程序的图形界面,后来搜到了这样的解决方案:

https://stackoverflow.com/questions/27384725/ssh-x-warning-untrusted-x11-forwarding-setup-failed-xauth-key-data-not-gener

具体操作就是:

1. Edit ~/.ssh/config, add

 XAuthLocation = /opt/X11/bin/xauth  to the host config

2. Ensure xauth is installed on the destination host

3. ssh -X your_server works in a secure manner