問題描述:
使用xshell遠程登錄至一台服務器1,在會話--SSH--隧道中設置好X11轉移
目前可在服務器1上打開軟件的圖形界面,此時ssh到另一台服務器2,則無法打開圖形界面
ssh -X 服務器2
報錯:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
解決:
在服務器2上,安裝xauth
# yum install xauth
編輯/etc/ssh/sshd_config
X11Forwarding yes
編輯/etc/ssh/ssh_config
ForwardX11Trusted yes
ForwardX11 yes
ForwardAgent yes
最后登錄服務器2時,使用:
ssh -C -Y 服務器2