rWanBoy 's BLOG [Welcome to my Blog]记录着点点滴滴,保存着许许多多

windows内网端口映射到外网(可直接映射远程桌面的端口,直连)

 

windows内网端口映射到外网(可直接映射远程桌面的端口,直连)
原创饬殇07 最后发布于2019-04-15 16:34:56 阅读数 3120  收藏
展开
1.windows没有外网IP,但是可以直连外网

2.有一台有外网IP的linux机器

3.windows安装openssh ,安装方法:

1.下载

https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH

2.解压,并将文件重命名OpenSSH 移动到C:\Program Files

 

   3.管理员运行cmd命令进入到C:\Program Files  ,运行

powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
4.做端口映射 : ssh -N -R 0.0.0.0:3389:localhost:3389 root@外网IP

 

之后链接远程桌面便直接用外网IP了


2020年3月24日 | 发布:rwanboy | 分类:未分类 | 评论:0

发表留言: