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 -vvrhsrv出力ファイルで手がかりを見つけましたが、かなりよかったです。

$ 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 

ログファイルや私が探しているものがありませんか?

ベストアンサー1

おすすめ記事