是否可以使用 Git Bash 在 Windows 10 上建立 SSH 隧道?

Ada*_*rax 4 windows ssh git-bash

我正在尝试将端口 5000 从本地计算机转发到远程服务器的端口 5000

我正在使用命令

ssh -L 5000:localhost:5000 root@remote
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试在本地计算机上发出以下 curl 请求时

curl http://172.19.0.2:5000
Run Code Online (Sandbox Code Playgroud)

它超时,而相同的命令在远程机器上工作。

有什么我遗漏的或者这可能在 Windows 上吗?

Ken*_*ter 6

ssh -L 5000:localhost:5000 root@remote
curl http://172.19.0.2:5000
Run Code Online (Sandbox Code Playgroud)

如果要通过 SSH 隧道进行连接,则必须连接到由ssh以下方法创建的本地侦听端口:

curl http://localhost:5000
Run Code Online (Sandbox Code Playgroud)