ssh -X 转发图形界面

服务端配置:

1
2
3
vim /etc/ssh/sshd_config
AllowTcpForwarding yes
X11Forwarding yes

客户端配置:

1
2
3
4
5
6
7
8
Host test
User root
HostName 127.0.0.1
Port 22
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes

连接:

1
ssh -x test

测试:

1
gedit xxx.txt