Tunneling Remote Desktop over SSH in Windows 7

1 篇文章 0 订阅

Tunneling Remote Desktop over SSH in Windows 7


Every so often I find myself away from home and needing to use Remote Desktop over an unsecured wireless network. The Remote Desktop Protocol implemented in Windows 7 has made significant improvements in security over previous versions, but I still like to tunnel the Remote Desktop session through an SSH connection for the extra security. Tunnneling means that data sent to a local port are forwarded through an SSH connection to a remote port. In the case of Remote Desktop, once the SSH connection and tunnel are established, the Remote Desktop connection is made to <localhost>:<port> instead of the <remote host>:<port>. SSH listens for data on that local port and forwards it through the tunnel to the specified port on the remote host.

Before continuing, you’ll need

  1. SSH server on your remote Windows machine
  2. SSH client on the local machine

The rest of this article assumes you’ve got these components installed and working. I use copssh for an SSH server on Windows 7, and I use PuTTY for an SSH client on my local Windows 7 machine. With the server and client working, there are two simple steps to tunneling Remote Desktop over SSH: establish the tunnel, then establish the Remote Desktop connection.

Establishing the SSH Tunnel

In PuTTY, set up your session like normal then go to the Connection > SSH > Tunnels screen:

PuTTY tunnel options

Setting up a tunnel in PuTTY

Set the source port to 3391, and set the destination to <hostname>:3389 (e.g. google.com:3389, or equivalently 66.102.7.99:3389). Leave “Local” and “auto” selected. Click Add. (I’m using google.com here instead of any useful domain just as an example)

Important: note the source port is 3391, not 3390 as is typically used in many tutorials around the web. Windows 7 blocks Remote Desktop connections to localhost:3390. The source port could be any number of ports, so feel free to try something else if 3391 is already used on your system. (But note that 3389 is the default Remote Desktop port, so do not change that number unless you know what you’re doing).

The added tunnel should look something like this:

PuTTY Tunnel added

PuTTY tunnel added

This means that the SSH connection will listen for data on local port 3391 and forward it to google.com, port 3389.

Now, open the SSH connection (click Open). A PuTTY terminal will open; you can minimize it or use it as needed, but we won’t need it any more for this tutorial. The simple fact that it’s present means that an SSH connection has been established between your local system and the remote host, and the tunnel is open.

Establishing the Remote Desktop Connection

Now that the tunnel has been opened between the local host port 3391 and remote host port 3389, we can start the Remote Desktop connection. Instead of typing the remote host name in the Remote Desktop connection window, type localhost:3391.

Remote Desktop Connection

Remote Desktop Connection to localhost:3391

Hit Connect, and that’s it! Barring any unforeseen problems (see below for some tips on troubleshooting), you’ll be enjoying a Remote Desktop Connection to a remote computer tunneled securely through an SSH connection. This means all data transmitted and received over the course of interacting with the Remote Desktop session is protected by all the security measures inherent in the SSH protocol. It’s not impenetrable, but it’s better than RDP alone.

Suggestions for Troubleshooting

If you run into problems, these are some likely culprits:

Firewall – if there is a problem, this is often the source. Make sure you can successfully connect to the remote SSH server using the SSH client on the local machine (this requires port 22 open). Also make sure you can establish a Remote Desktop connection to the remote machine (port 3389). If you can do both of these, then the firewall is not the problem.

Try a different local port – there is always the possibility that port 3391 on the local machine is used for something else. Try changing this to something random.

Make sure remote desktop is available and enabled – only Professional and Ultimate versions of Windows 7 will serve Remote Desktop connections (other versions may have just the client for connecting to other machines). Additionally, Windows 7 disables Remote Desktop by default. From the start menu, right-click on Computer then click Properties, then click Remote Settings. You may also have to explicitly modify the Windows 7 Firewall to allow Remote Desktop (i.e. open port 3389).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SURE - 智能通用遥控器 如果您正在为三星或LG智能电视,Roku TV,Kodi和其他智能媒体设备寻找遥控器,那么SURE Universal™是您的一体化解决方案。亚马逊Alexa功能的新版本! ★SURE Universal™让您的智能家居 变得简单★ SURE通用遥控器非常易于使用!在下载后的几分钟内,您就可以控制智能电视,媒体流媒体,空调以及更多设备。请一定要试一试。 ★SURE Universal - 工作 原理★ SURE Universal遥控器最适合配备红外线(IR)冲击波的智能手机。对于没有红外线的手机,如三星Galaxy S7,S8和Note 5,您可以使用Broadlink WiFi-to-IR转换器获得全部功能。使用WiFi,您可以控制众多智能电视和媒体流媒体,如三星,LG,Android,Roku,Kodi和Apple TV,甚至亚马逊FireTV。 ★亚马逊Alexa语音集成★ 亚马逊Alexa和SURE Universal完全集成。利用此功能并在应用程序内使用语音命令。 ★将照片和视频从手机传输到智能电视★ 使用WiFi和DLNA,您可以将手机中的图片和视频发送到智能电视。您最喜爱的照片和视频在手机上看起来不错,但在大型高分辨率电视屏幕上看起来会很壮观。 ★使用共享网络进行 文件复制★ 使用文件复制,您可以将文件从本地网络中的共享文件夹复制到移动设备,从移动设备复制到本地网络。 ★你值得拥有最佳★ SURE Universal在2016年亚洲智能手机应用大赛中获得大奖。它位于全球“House&Home”类别的排行榜榜首,是Play商店中评价最高且排名最高的遥控器。 ★确保客户支持★ 我们回答所有客户的要求和建议。请在Google Play上撰写评论或发送电子邮件至support@sureuniversal.com与我们 联系。 我们维护着一个包含大约一百万个IR设备的大型数据库,但是,有些设备可能会丢失。如果您找不到您的设备,请将您的设备品牌和型号发送至 support@sureuniversal.com 有关培训,请参阅我们的支持和培训部分:http: //www.sureuniversal.com/support-training ★用户权限★ 我们有严格的隐私政策(请参阅下面的网站链接),未经授权访问用户数据,也无需登录操作遥控器。安装时我们会询问以下用户权限: 1.身份 - 如果您想订阅无广告版本 2,可以进行计费。位置 - 用于广告和未来的物联网 3.照片/媒体/文件 - 用于从手机流式传输到智能电视。 4.麦克风 - 在智能电视中访问麦克风以获取语音命令 5. WiFi - 用于连接智能电视 6.设备ID和呼叫信息 - 用于在电话响铃时静音智能电视(通过设置启用) 最新消息: *新设计 *改进的用户界面 *支持Android 9 Pie *支持所有智能电视:三星,LG,Android TV和Roku TV *将手机中的媒体文件投射到智能设备上 *修复了错误 Mod Info: 高级功能解锁; 广告已删除; 分析已禁用; 赞助的DailyOffer禁用; 已移除所有广告和AppBoy Inapp来自活动的电话; 原生aerserv + baidu + inneractive广告横幅布局删除; AOSP兼容。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值