줄기세포

[X11 Forward] 클라우드 서버 SSH - GUI 사용방법 (xshell, xming, X11 Forwarding) 본문

Linux

[X11 Forward] 클라우드 서버 SSH - GUI 사용방법 (xshell, xming, X11 Forwarding)

줄기세포(Stem_Cell) 2021. 11. 14. 01:50

KT 클라우드를 이용했습니다.
클라우드 서버에 ssh 접속을 위해서 방화벽 오픈 및 접속설정을 해주셔야 합니다.

 

1. Client PC 설정

제가 사용한 PC는 Window 환경이고 11에서 작업하였습니다. (윈10과 같은 방법으로 진행하면 된다고 생각합니다.)

 

1-1. Xshell, Xming 다운로드 & 설치

Xshell 다운로드 및 설치 (google 검색) / 업무용이 아니라면 학생용으로 신청하면 됩니다.

Xming X Server 다운로드 (google 검색)

+ Xming-fonts-setup 도 같이 설치하면 좋습니다.

 

1-2. Xshell에 세션에 Xdisplay 터널링 설정

 

X DISPLAY에 Xming Server:0.0 값에 맞춰

localhost:0.0를 적어줍니다. 

 

 

 

 

 

 

2. Server X11 설정

 

2-1. ssh X11 Forwarding 설정

([출처] : CentOS 7 Server _ X11 forwarding 설정 가이드 | 작성자 NAVER Cloud Platform)

 

/etc/ssh/sshd_config에서 X11Forwarding 변경

$vi /etc/ssh/sshd_config	

    	AddressFamily any -> AddressFamily inet 로 수정
		X11Forwarding yes
		X11DisplayOffset 10
        X11UseLocalhost no
		UseLogin no


$ systemctl restart sshd		# sshd 재시작

 

2-2. xorg-x11, xclock 패키지 설치 및 확인

$ yum group install "GNOME Desktop" -y
$ yum install xorg-x11-apps -y
$ yum install xorg-x11-xauth -y
$ yum install xorg-x11-server-Xorg -y
$ yum install xorg-x11-utils -y

$ yum install xclock -y			# x11 테스트 용으로 사용 (필수패키지 아님)
$ rpm -qa | grep xorg		# 설치 패키지 확인

xorg-x11-xkb-utils-7.7-14.el7.x86_64
xorg-x11-server-common-1.20.1-5.6.el7_6.x86_64
xorg-x11-server-utils-7.7-20.el7.x86_64
abrt-addon-xorg-2.1.11-57.el7.centos.x86_64
xorg-x11-xauth-1.0.9-1.el7.x86_64
xorg-x11-utils-7.5-23.el7.x86_64
xorg-x11-font-utils-7.5-21.el7.x86_64
xorg-x11-apps-7.7-7.el7.x86_64
xorg-x11-server-Xorg-1.20.1-5.6.el7_6.x86_64

2-3. X11 인증기록 파일 생성

$ touch /root/.Xauthority
$ chmod 600 /root/.Xauthority

재부팅

$ reboot

2-4. DISPLAY 환경변수 설정 및 xclock 실행

$ vi ~/.bash_profile

	export DISPLAY=localhost:10.0

$ source ~/.bash_profile

$ xdpyinfo		# 결과값이 나와야 함
$ xclock

아래와 같이 뜨면 성공

 

 

 

https://novice-data.tistory.com/43

 

[.Xauthority 권한 설정] 모든 유저가 추가 조치 없이 x11 forwarding 사용할 수 있도록 환경설정 하는 방

x11으로 DISPLAY를 어느 유저에서나 사용할 수 있는 방법을 공유해보려 한다. 개발용으로 클라우드 서버에서만 사용하기 때문에 보안을 염두에 두고 하는 방법은 절대 아니다. 나는 root 로그인 정

novice-data.tistory.com

 

 

 

https://blog.naver.com/n_cloudplatform/221451047036

 

[이렇게 사용하세요!] CentOS 7 Server _ X11 forwarding 설정 가이드

안녕하세요! 네이버 클라우드 플랫폼입니다. 이번 포스팅에서 소개해드릴 내용은 CentOS 버전 'G...

blog.naver.com

https://chhanz.github.io/linux/2021/05/25/yum-groupinstall/

 

[Linux] Yum Group 상세 활용

yum group 관련 명령어 Group Package 를 설치 할 때, 주로 이용하는 명령어 입니다. yum groupinstall , yum groupinfo , yum grouplist 등이 있습니다. 기본 사용법 주로 사용 하는 명령어 몇가지에 대해 알아보자. yu

chhanz.github.io

 

Comments