如何通过Cygwin的ssh远程访问其他服务器
2014-12-20 21:17
519 查看
转载自:http://x.cygwin.com/docs/ug/using-remote-apps.html
Displaying remote X clients with Cygwin/X is identical to displaying remote X clients with any other X Server.
It is recommended that you use the secure method of tunnelling the X connection over ssh.Alternatively, you can use the host-based access control provided by the X server, connecting to the remote machine using telnet or rsh and
directing clients to connect to the server by setting the DISPLAY environment variable. This method is insecure and not recommended.
Secure ssh
On your Windows machine:
Make sure you have the openssh package installed.Launch Cygwin/X
Ensure the DISPLAY environment variable is set correctly. (This step is not neccessary if you are entering your commands into an X terminal, as DISPLAY must already be set in that case)
$ export DISPLAY=:0.0 |
$ ssh -Y username@remote_hostname_or_ip_address |
Your ssh session should now show you a shell prompt for your remote machine.
Note: The ssh server will automatically set the DISPLAY environment variable appropriately, typically to something like localhost:10.0, so clients will connect to a proxy X11 display on the remote host from which
the X11 protocol will be forwarded over ssh to your X server.
If your login scripts unconditionally set DISPLAY to something else, this will break X11 forwarding.
You can now launch remote X clients in your ssh session, for example:
$ xterm & |
Launch other remote clients in the same manner. I recommend starting the remote clients in the background, by appending & to the command name, so that you don't have to open several ssh sessions.
Note: By default, the OpenSSH server does not allow forwarded X connections. This must be configured on the remote host by adding X11Forwarding yes to the sshd_config configuration file.
The OpenSSH server must be restarted or SIGHUP'ed to re-read the configuration file after it is changed.
Note: The OpenSSH server requires the xauth command to be available to forward X connections. Consequently, it must be installed on the remote host.
相关文章推荐
- MySQL workbench外网通过PuTTY设置SSH的tunnels远程访问内网服务器中的MySQL
- 如何通过域名访问远程SQLSERVER服务器
- Ubuntu下本地ipython notebook通过ssh远程访问远程服务器
- 搭建了一个Apache+Php+MySQL的服务器。要如何通过Apache发布网站使得其他的电脑可以通过局域网访问?
- 如何通过反向 SSH 隧道访问 NAT 后面的 Linux 服务器
- Anaconda 5.0.0 JupyterLab 0.27.0 中通过 SSH 访问远程 Linux 服务器
- ssh 如何通过外网访问内网多台服务器
- ssh如何通过跳板机直接访问到后端服务器(Mac&Linux&Windows解决方案)
- ssh 如何通过外网访问内网多台服务器
- IIS服务器如何设置 iis远程访问设置 天丁
- 如何实现 ssh 访问远程机器
- 如何在64位win7下通过ODAC来访问Oracle服务器
- 通过SSH协议访问远程Shell脚本-免密码登陆与返回数据丢失解决
- 通过MS SQL Server 链接服务器访问远程数据
- 如何实现在ARM开发板对Postgresql服务器的远程访问,有C程序,(mini6410,mini2440,tq2440)
- linux命令行中通过ssh复制文件(scp)到远程服务器
- 通过SSH访问远程Linux服务器的四个安全策略
- 通过MS SQL Server 链接服务器访问远程数据[转载]
- 禁止root通过SSH远程登录访问与限制某些用户远程登录