ssh远程linux机器时,如何启动X11转发
2013-12-13 11:33
316 查看
X11 forwarding needs to be enabled on both the client side and the server side.
On the client side, the -X (capital X) option to ssh enables X11 forwarding, and you can make this the default (for all connections or for a specific conection) with ForwardX11 yes in ~/.ssh/config.
On the server side, X11Forwarding yes must specified in /etc/ssh/sshd_config. Note that the default is no forwarding (some distributions turn it on in their default /etc/ssh/sshd_config), and that the user cannot override this setting.
The xauth program must be installed on the server side. If there are any X11 programs there, it's very likely that xauth will be there. In the unlikely case xauth was installed in a nonstandard location, it can be called through ~/.ssh/rc (on the server!).
Note that you do not need to set any environment variables on the server. DISPLAY and XAUTHORITY will automatically be set to their proper values. If you run ssh and DISPLAY is not set, it means ssh is not forwarding the X11 connection.
To confirm that ssh is forwarding X11, check for a line containing Requesting X11 forwarding in the
ssh -v -X output. Note that the server won't reply either way.
http://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-from-ubuntu-machine
On the client side, the -X (capital X) option to ssh enables X11 forwarding, and you can make this the default (for all connections or for a specific conection) with ForwardX11 yes in ~/.ssh/config.
On the server side, X11Forwarding yes must specified in /etc/ssh/sshd_config. Note that the default is no forwarding (some distributions turn it on in their default /etc/ssh/sshd_config), and that the user cannot override this setting.
The xauth program must be installed on the server side. If there are any X11 programs there, it's very likely that xauth will be there. In the unlikely case xauth was installed in a nonstandard location, it can be called through ~/.ssh/rc (on the server!).
Note that you do not need to set any environment variables on the server. DISPLAY and XAUTHORITY will automatically be set to their proper values. If you run ssh and DISPLAY is not set, it means ssh is not forwarding the X11 connection.
To confirm that ssh is forwarding X11, check for a line containing Requesting X11 forwarding in the
ssh -v -X output. Note that the server won't reply either way.
http://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-from-ubuntu-machine
相关文章推荐
- 如何修改Linux远程端口/如何修改ssh端口?
- linux局域网下远程启动机器
- 如何设置SSH无密码登录远程Linux主机
- Windows利用SSH - X远程登录Linux主机(X11-forwarding)
- 通过ssh远程启动linux上的Qt界面程序
- 如何使用 syslog-ng 从远程 Linux 机器上收集日志
- 如何通过linux ssh远程linux不用输入密码登入
- linux脚本:ssh 启动多个远程程序
- 如何在安装了双系统的机器上修改默认启动系统(Linux,Windows)
- 如何启动linux ssh服务
- 如何使用远程linux系统中ssh秘钥文件转换成putty可以使用的ppk文件
- SSH登录到远程linux机器并执行命令
- 如何通过命令行执行远程linux机器上的命令
- 如何在安装了双系统的机器上修改默认启动系统(Linux,Windows)
- windows下如何登录Linux VPS进行远程(SSH)管理
- 如何将项目部署到远程的Linux机器上的tomcat上
- 如何通过linux ssh远程linux不用输入密码登入
- 如何使用客户端SSH远程启动weblogic
- ubuntu下允许root用户ssh远程登录及Linux下服务的启动
- 如何通过linux ssh远程linux不用输入密码登入