通过 GCE 设置 SSH 隧道

Setting up SSH tunnel through GCE

我正在按照此处的说明进行操作 https://cloud.google.com/community/tutorials/ssh-tunnel-on-gce 通过 Compute Engine 设置 SSH 隧道。我使用此命令创建了一个计算实例:

gcloud compute instances create --zone us-west1-a tunnel 

很好,然后我尝试了 运行 在本地端口 5000 和 SSH 端口 22 上的机器上启动 SSH 隧道的命令:

gcloud compute ssh --zone us-west1-a tunnel -- -N -p 22 -D localhost:5000

我收到以下错误:

您正在使用的命令不适用于 Windows,仅适用于 Linux。 CLI gcloud 在 Windows 上启动 putty.exe。查看有关等效命令行选项的 putty 文档并直接启动 putty.exe 而不是 CLI。对于 Windows,我建议改用 Windows 版本的 ssh.exe (OpenSSH)。

Installation of OpenSSH For Windows Server 2019 and Windows 10