Software⏱️ 2 min read📅 2026-05-31

How to Fix: What does "Warning: untrusted X11 forwarding setup failed: xauth key data not generated" mean when ssh'ing with -X?

Quick Answer: The warning can be ignored as X11 forwarding seems to work fine, and the fake authentication data is sufficient for the connection.

The warning message you're seeing indicates that the xauth key data isn't being generated for X11 forwarding, which is a requirement for secure X11 forwarding. This issue can occur due to various reasons such as an incompatibility between the Mac's and Ubuntu's X11 implementations or a missing configuration.

🔍 Why This Happens

  • [Cause]

🚀 How to Resolve This Issue

Method 1: Generate xauth Key Manually

  1. Step 1: Run the following command on your Mac to generate an xauth key.

Method 2: Update the X11 Client

  1. Step 1: On your Mac, update to the latest version of XQuartz using Homebrew (brew upgrade xquartz) or download and install the latest X11 client.

✨ Wrapping Up

By following these steps, you should be able to resolve the warning message and enjoy secure X11 forwarding on your Mac.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions