X11 포워딩
SSH로 GUI 앱 띄울 때 X11 포워딩 설정.
X11 포워딩
클라이언트 설정
Mac은 XQuartz 설치 https://www.xquartz.org/
ssh config 수정
Host [서버_별칭]
HostName [서버_IP]
User [사용자명]
ForwardX11 yes
- ForwardX11 yes: X11 포워딩 켜는 옵션
서버 설정
/etc/ssh/sshd_config 파일에 추가
X11Forwarding yes
xauth 설치
sudo apt install xauth
재시작은 필요 없음.
여기서 배울 것
- X11 포워딩은 클라이언트, 서버 양쪽 다 설정 필요함.
- Mac에서는 XQuartz 깔아야 동작함.
- ssh config에 `ForwardX11 yes` 넣으면 끝.
- 서버는 `sshd_config`에 `X11Forwarding yes` 추가하고 `xauth` 설치.
원본 파일 보기 (.claude/skills/tn-x11-forwarding/SKILL.md)
---
name: SSH X11 포워딩 설정
description: Use when the user wants to enable X11 forwarding over SSH to run graphical applications remotely, covering both client (e.g., macOS XQuartz, ssh config) and server (e.g., sshd_config, xauth) setup.
version: 1.0.0
source: /home/son/prj/resume/backup_notes_260317/notion/Tech Note/x11 26ed7efd824b8015803bed16402d74d3.md
---
# x11
## Client
install xquartz (MacOS)
[https://www.xquartz.org/](https://www.xquartz.org/)
ssh config
Host your_server_alias
HostName your_server_ip
User your_username
**ForwardX11 yes**
## Server
/etc/ssh/sshd_config
add
X11Forwarding yes
sudo apt install xauth
no need to restart