How to install X Window System XQuartz on macOS for ssh X11 forwarding

How to install X Window System XQuartz on macOS for ssh X11 forwarding

To install the X Window System (XQuartz) on macOS for ssh X11 forwarding, you can follow these steps:

  1. Download the XQuartz installer package from the XQuartz website: https://www.xquartz.org/

  2. Double-click on the downloaded XQuartz.pkg file to open the installer.

  3. Follow the on-screen instructions to complete the installation.

After installing XQuartz, you can enable ssh X11 forwarding by adding the ForwardX11 yes option to your ~/.ssh/config file. This will allow you to forward X11 applications from remote servers to your local macOS system, and display them using the XQuartz application.

To enable ssh X11 forwarding, open a Terminal window and run the following commands:

# Open the ssh config file in a text editor
nano ~/.ssh/config

# Add the ForwardX11 yes option to the file
ForwardX11 yes

# Save and close the file
Source‮.www:‬lautturi.com

After modifying the ~/.ssh/config file, you can connect to a remote server using ssh and run X11 applications. They will be forwarded to your local macOS system and displayed using the XQuartz application.

Created Time:2017-10-16 14:38:48  Author:lautturi