hns - 日記自動生成システム - Version 2.19.9

先月 2010年04月 来月
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2010年04月28日(水) 旧暦 [n年日記] [更新:"2010/04/29 15:37:19"]

#1 [comp] ssh -o XauthLocation=/usr/pkg/bin/xauth の謎

ssh 元NetBSD/amd645.0_STABLEOpenSSL 0.9.9-dev
ssh 先NetBSD/i3865.0_STABLEOpenSSL 0.9.9-dev
以前に nork さんと hrs さんに ssh についていろいろ教わった。 それまでは、「ssh -X がどうもうまく行かない」状態だった。 今回は、どうやれば良いかを再確認した。 条件としては、 NetBSD/amd64 5.0_STABLE で動いている X11 の画面から NetBSD/i386 5.0_STABLE に ssh で入り、その中で X11 の用途別(application) を立上げる、という場合の話。
出発の ssh も、受けの sshd も同じ版
OpenSSH_5.0 NetBSD_Secure_Shell-20080403, OpenSSL 0.9.9-dev 09 May 2008
また受け側の sshd では /etc/ssh/sshd_config を次のように変更している
-#X11Forwarding no
+X11Forwarding yes
 # If you use xorg from pkgsrc then uncomment the following line.
-#XAuthLocation /usr/pkg/bin/xauth
+XAuthLocation /usr/pkg/bin/xauth
元の X11 は modular-xorg, 起動は xdm。また二つの機械は home directory を共有している。

ssh -v -X hostname:

debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.

ssh -v -X -o XauthLocation=/usr/pkg/bin/xauth hostname:

Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.

ssh -v -Y hostname:

debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.

ssh -v -Y -o XauthLocation=/usr/pkg/bin/xauth hostname これならうまく行く:

あるいは
ssh    -Y -o XauthLocation=/usr/pkg/bin/xauth hostname
だと大丈夫

まとめ

  • -X でなく -Y が必要
  • ssh 先の /etc/ssh/sshd_config に
    XAuthLocation /usr/pkg/bin/xauth
    
    と書いてあっても、 ssh 元の方で、 これを上書きする設定を送っているらしく、 効かないので、元の方で次の選択を付けておく
    -o XauthLocation=/usr/pkg/bin/xauth
    
  • 前項の、「これを上書きする設定」は /etc/ssh/ssh_config で設定可能で、その中を次のようにすると
    47  # If you use xorg from pkgsrc then uncomment the following line.
    48      XAuthLocation /usr/pkg/bin/xauth
    
    次のように指定無で行ける
    ssh -Y hostname
    



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)