ssh GUI in local Ubuntu14.04

1.In ssh service agent (controlled computer),find /etc/ssh/sshd_config,make sure [ X11Forwarding yes ],note no [ # ] in front of [ X11Forwarding ],and then :

cd /etc/init.d
./ssh restart

2.In local agent,find /etc/ssh/ssh_config,make sure

ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes

3.Next open terminate,assume ubuntu local agent ip is 1.1.1.1,ssh service agent ip is 2.2.2.2 .Connect to controlled computer by

xhost +2.2.2.2
ssh -X username@2.2.2.2   | or ssh -Y username@2.2.2.2  
export DISPLAY="127.0.0.1:10.0"

Test : 

xclock

 

posted @ 2017-04-08 11:46  chanyn  阅读(214)  评论(0编辑  收藏  举报