1.windows没有外网IP,但是可以直连外网
2.有一台有外网IP的linux机器
3.windows安装openssh ,安装方法:
1.下载 https://github/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 可以使用了