[linux] X11 forwarding 설정 (CentOS 7)

somnode·2020년 9월 27일
0

X11은 ssh 접속을 통한 CLI 환경에서 GUI 프로그램을 실행할 수 있도록 해준다.
윈도우에서 리눅스에 ssh로 접속하여 GUI 프로그램을 띄운다고 할 때,
윈도우를 Client, 리눅스를 Server라고 생각하면 된다.

Server 설정

  1. GNOME Desktop 설치
> yum groupinstall -y "GNOME Desktop" "Fonts"
  1. X11 관련 패키지 설치
> yum install -y xorg-x11-apps.x86_64 xorg-x11-xauth.x86_64 xorg-x11-server-Xorg.x86_64
  1. ssh 설정
    아래와 같이 설정되도록 /etc/ssh/sshd_config 파일을 수정한다.
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
  1. x11 세션 인증 기록파일 생성 및 권한 설정
> touch /root/.Xauthority; chmod 600 /root/.Xauthority
  1. ssh 데몬 restart
> service sshd restart

Client 설정

  1. Xming 설치 및 실행
    https://sourceforge.net/projects/xming/
  2. 원격 접속 프로그램에서 x11 사용 설정 (ex. PuTTY)
    PuTTY에서 Connection -> SSH -> X11 -> Enable X11 forwarding 체크

0개의 댓글