SSH

SSH

로컬 네트워크에 Ubuntu 서버가 있고 SSH를 통해 gedit를 실행할 수 있습니다. 그것은 아주 잘 작동합니다.

그리고 VPN을 통해 원격 Red Hat 7에 연결하는 데 실패했습니다. 다음 명령으로 연결합니다.

ssh -X -o ForwardX11=yes -o ForwardX11Trusted=yes rhsrv

그러면 나는 실패합니다:

$ gedit 
(gedit:3085): Gtk-WARNING **: 23:13:00.902: cannot open display: 10.255.255.202:0

확인하기 위해 몇 가지 명령을 실행했습니다.

# is DISPLAY set?
$ echo $DISPLAY 
10.255.255.202:0

# Exists the .Xauthority ?
$ strings ~/.Xauthority
MIT-MAGIC-COOKIE-1

$ xauth list
rhsrv:10  MIT-MAGIC-COOKIE-1  43f5b66044bf4645cde63c22213a0c28

$ xauth info
Authority file:       /home/joe/.Xauthority
File new:             no
File locked:          no
Number of entries:    1
Changes honored:      yes
Changes made:         no
Current input:        (argv):1

# Is route back to client pc open? yes:
$ ssh 10.255.255.202 22
[email protected]'s password:

# IPv6 problems? no:
$ sudo egrep "^(X|Ad)" /etc/ssh/sshd_config
AddressFamily inet
X11Forwarding yes
X11UseLocalhost no

$ rpm -qa | grep x11
xorg-x11-apps-7.7-7.el7.x86_64
xorg-x11-font-utils-7.5-21.el7.x86_64
xorg-x11-fonts-Type1-7.5-9.el7.noarch
xorg-x11-xauth-1.0.9-1.el7.x86_64

나는 rm ~/.Xauthority성공하지 못한 채 새 파일을 얻으려고 노력했습니다.

나는 노력했지만 ssh -Y운이 없었다.

이것을 변경한 후 다음을 /etc/ssh/sshd_config실행했습니다.

# systemctl reload sshd
# systemctl restart sshd
# cat /var/run/sshd.pid | xargs kill -1

클라이언트 PC에서 자세한 작업을 실행 ssh -vv하고 rhsrv출력 파일에서 단서를 찾았지만 꽤 좋아 보였습니다.

$ egrep "(Req|[Xx]11)" rhsrv
debug1: Requesting [email protected]
debug2: x11_get_proto: /usr/bin/xauth  list :0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 1
debug1: Requesting authentication agent forwarding.
debug2: X11 forwarding request accepted on channel 0

이 내부 네트워크와 서버의 다른 사용자는 GUI에서 Emacs를 실행하는 데 아무런 문제가 없다고 보고했습니다. 그의 서버 경로는 그가 ens192별칭 ens193(10.xxx)에 연결되는 네트워크 인터페이스(172.23.xx)에 연결된다는 점에서 약간 다릅니다. 그의 $DISPLAY변수는 다음과 같이 말합니다.

$ echo $DISPLAY
pd9993b1.example.org:0

그래서 그는 유효한 역방향 DNS 조회를 가지고 있고 나는 그렇지 않습니다. $DISPLAY이와 같은 내용을 읽을 것으로 예상되었지만 localhost:10.0그럼에도 불구하고 그의 GUI는 잘 작동합니다.

라우팅은 다음과 같습니다(그러나 관련성이 없어야 함).

$ /sbin/routel 
     target         gateway source    proto  scope    dev tbl
    default     172.23.10.1          static        ens192 
10.255.0.0/ 16  10.255.20.1          static        ens193 

로그 파일이나 제가 찾고 있는 내용이 누락되었나요?

관련 정보