【发布时间】:2023-01-21 07:44:37
【问题描述】:
我想在我的 Windows PC 上通过 SSH 连接到 WSL。 已使用 netsh 正确设置端口转发规则。
ADDRESS PORT ADDRESS PORT
--------------- ---------- --------------- ----------
0.0.0.0 3333 172.19.56.231 22
连接地址通过wsl -d "Ubuntu-22.04" hostname -I获取
我可以通过ssh shflte@172.19.56.231 SSH 到 WSL。但我无法通过ssh shflte@192.168.100.156 -p 3333(192.168.100.156 是我的 PC 地址)SSH 到 WSL。所以我猜问题不是出在 WSL 上。
SSH 消息:
ssh shflte@192.168.100.156 -p 3333 -v
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Reading configuration data C:\\Users\\SH/.ssh/config
debug1: Connecting to 192.168.100.156 [192.168.100.156] port 3333.
debug1: connect to address 192.168.100.156 port 3333: Connection refused
ssh: connect to host 192.168.100.156 port 3333: Connection refused
谁能告诉我为什么我得到Connection refused?
【问题讨论】:
标签: ssh windows-subsystem-for-linux