2015年1月26日月曜日

x11 connection rejected because of wrong authentication

どうも、.ssh/rcを設定するとssh -Xで画面が飛ばせなくなるようである。
ルート権限がないので、一番下のsshrcの設定を自分のところに書いておいた。
かかなくてもいいような気がするけど試してない。

It not works because I have /etc/ssh/sshrc
End in sshd(8) writen next:
If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists, runs it; otherwise runs xauth
So I write in /etc/ssh/sshrc next commands (also from man):
        if read proto cookie && [ -n "$DISPLAY" ]; then
                if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
                        # X11UseLocalhost=yes
                        echo add unix:`echo $DISPLAY |
                            cut -c11-` $proto $cookie
                else
                        # X11UseLocalhost=no
                        echo add $DISPLAY $proto $cookie
                fi | xauth -q -
        fi
And it works!

http://serverfault.com/questions/278743/ssh-x11-not-working

0 件のコメント:

コメントを投稿