SSH tunnel Aliyun to Home Windows Desktop

Refer to SSH tunnel manual login

https://blog.csdn.net/hushui/article/details/106212429

Note

1. Aliyun 需要打开控制台/安全组规则  https://ecs.console.aliyun.com/   允许 port /tcp/9999   and 9901

2.  Centos firewall setting 
firewall-cmd --list-all
firewall-cmd --zone=public --add-port=9999/tcp --permanent
firewall-cmd --reload 

 

 

 

 


Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : WindowsHOME 
   IPv4 Address. . . . . . . . . . . : 10.73.XXX.XXX
   Subnet Mask . . . . . . . . . . . : 255.255.255.0 


1. Step on Windows side      Win10 has OpenSSH Server now!
   Windowds  tunnels to  AliyunServer(47.100.XXX.XXX) port 9901
windows ==>  
ssh -C -f -N -o ServerAliveInterval=600 -R 9901:127.0.0.1:22 lake@AliyunServer


ssh tunnel :   WindowsHome:22<======== AliyunServer:9901  


2.Step2   on  AliyunServer(47.100.XXX.XXX)    WindowsHome IP  10.73.XXX.XXX

[lake@AliyunServer ~]$ ssh  -p9901    WindowsHomeAccount@localhost  ==> Windows SSH server test 

[lake@AliyunServer ~]$ ssh -f -N   WindowsAccount@localhost  -p9901    -L 0.0.0.0:9999:WindowsHome:3389  


ssh tunnel :   WindowsHome:3390 <======== AliyunServer:9999  

3.  Outside  Remote Desktop   ========>  AliyunServer:9999   =======>  WindowsHome:3389 

 

4. reconnect loop   Refer to 

SSH tunnel/backgroud automatic 自动后台 (https://blog.csdn.net/hushui/article/details/107334246)

 

 

Refer to 

https://blog.netnerds.net/2017/12/updated-ssh-tunneling-for-windows-people-protecting-remote-desktop/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值