응용

SSH 원격 GUI 실행 지원 - Ubuntu Desktop

T8.CO.KR 2026. 10. 1. 19:33

sudo apt install -y ssh xauth xorg
sudo vi /etc/ssh/ssh_config

  Host *
    ForwardAgent yes
    ForwardX11 yes
    ForwardX11Trusted yes
    ...
    GSSAPIDelegateCredentials no
    ...
    Port 22
    Protocol 2
    ...
    XauthLocaion /usr/bin/xauth


sudo systemctl restart ssh
echo $DISPLAY
  localhost:10.0 *확인

*실행 예, xcalc, gedit, xeyes 등
ssh -X 계정@주소 xcalc
ssh -X 계정@주소 xclock

 

*Windows에서는...

  1. Xming 설치 후 실행
  2. puTTY > Connection > SSH > X11에서 Enable X11forwarding 체크
  3. 로그인 후 실행