在windows上,使用putty和xming的组合,就能将linux的GUI界面投射到windows上。当然linux上,会先执行xhost +命令。
使用ubuntu主机怎么实现这一点呢?================================================================================================
参考
http://www.fwolf.com/blog/post/166http://ubuntuforums.org/showthread.php?t=2017480$ ssh
oracle@192.168.1.118 -X
oracle@192.168.1.118's password:
Last login: Sun Nov 1 07:05:12 2015 from 192.168.1.107
/usr/bin/xauth: creating new authority file /home/oracle/.Xauthority
[oracle@base ~]$ gedit
[oracle@base ~]$ gedit &
[1] 2869
[oracle@base ~]$
或者
~$ ssh
oracle@192.168.1.118 -Y
oracle@192.168.1.118's password:
Last login: Sun Nov 1 07:22:11 2015 from 192.168.1.107
[oracle@base ~]$ gedit
[oracle@base ~]$ gedit &
[1] 2925
[oracle@base ~]$
两种方法都可以,现在就是不知道这两种有什么不同呢?
$ man ssh #执行这条命令时找到了下面的说明
-X Enables X11 forwarding. This can also be specified on a per-host
basis in a configuration file.
X11 forwarding should be enabled with caution. Users with the
ability to bypass file permissions on the remote host (for the
user’s X authorization database) can access the local X11 display
through the forwarded connection. An attacker may then be able
to perform activities such as keystroke monitoring.
For this reason, X11 forwarding is subjected to X11 SECURITY
extension restrictions by default. Please refer to the ssh -Y
option and the ForwardX11Trusted directive in ssh_config(5) for
more information.
-x Disables X11 forwarding.
-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not
subjected to the X11 SECURITY extension controls.
-y Send log information using the syslog(3) system module. By
default this information is sent to stderr.