카테고리 없음

ssh x1 forwarding from macOS to linux PC

Learever 2023. 7. 21. 10:31

1. TCP nolisten 해결

(https://coolengineer.com/entry/X-Window-Portforwarding)

 

 

X Window Portforwarding on MacOSx to Linux

리눅스는 주로 까만 화면의 터미널로 사용하지만, 가끔은 X Window 응용프로그램을 사용해야할 때가 있다. (xcalc 랄지...) 난 리눅스를 데스크탑으로 사용하지 않으므로, X System 전체를 설치하지 않

coolengineer.com

defaults write org.macosforge.xquartz.X11 nolisten_tcp 0

2. ssh 하는 대상, 즉 linux PC 에서

sudo vim /etc/ssh/sshd_config

xfoward yes 로 하기.

 

3. ssh 하는 host, 즉 macOS에서는 필요없다. 다만 -X 생략하고 싶으면

/etc/ssh/ssh_config


에서 xforward yes로.

 

4. ssh 한후 xclock 했을때 에러메시지에 나오는 localhost:11 의 숫자는 아무의미없다. 이 숫자랑 상관없이

macOS에서 (ssh 하기전에!)

export DISPLAY=:0


해주면됨.