You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 10升级至Windows 11后入站SSH等网络连接失败问题求助

Windows 10升级至Windows 11后入站SSH等网络连接失败问题求助

各位大佬好,我最近遇到了一个折腾好久都没解决的网络问题,想请大家帮忙支支招:

问题背景

之前我在旧PC上用Windows 10,搭好了OpenSSH密钥登录,远程连接用了好几年都没出过问题。因为旧主板不支持Win11,一直没敢升级。

最近换了全新硬件(新主板、新硬盘等),把旧系统盘克隆到新硬盘上,系统运行一切正常。新硬件支持Win11,于是我就升级了系统。经过一些小调整和几次非全量重装后,大部分功能都恢复正常了,但所有入站的网络连接全出问题了,怎么排查都找不到根源。

当前网络状态细节

  • 以太网设的是静态IP,互联网访问完全正常
  • 同一局域网内ping这台机器的本地IP完全失败
  • 换了一个从未用过的静态IP,还是ping不通
  • 出站的SSH、RDP、访问网络共享文件夹都正常
  • 入站的SSH、RDP、网络共享文件夹访问全部失败

我想避免的操作

绝对不想全量重装Windows 11,因为我有大量的软件配置和工作环境,重新搭建会耗费巨多精力。另外想请教:有没有办法只重置网络适配器,而不重置整个系统的其他设置?

已尝试的解决方案

  • 在「可选功能」里卸载并重新安装OpenSSH客户端和服务器
  • 确认防火墙的22端口已经开放
  • 重新检查了administrators_authorized_keys文件的权限设置
  • 临时禁用了杀毒软件

相关配置信息

sshd_config 文件内容

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey __PROGRAMDATA__/ssh/ssh_host_rsa_key
#HostKey __PROGRAMDATA__/ssh/ssh_host_dsa_key
#HostKey __PROGRAMDATA__/ssh/ssh_host_ecdsa_key
#HostKey __PROGRAMDATA__/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile  .ssh/authorized_keys

#AuthorizedPrincipalsFile none

# For this to work you will also need host keys in %programData%/ssh/ssh_known_hosts
#HostbasedAuthentication no

# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no

# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no

#PermitEmptyPasswords no

# GSSAPI options
#GSSAPIAuthentication no

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem   sftp    sftp-server.exe

# Example of overriding settings on a per-user basis
#Match User anoncvs
#   AllowTcpForwarding no
#   PermitTTY no
#   ForceCommand cvs server

Match Group administrators
AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys

netstat -an | sls ':22' 命令输出

PowerShell 7.4.1
PS C:\Users\xxxx> netstat -an | sls ':22'

TCP    0.0.0.0:22             0.0.0.0:0              LISTENING
TCP    127.0.0.1:2266         127.0.0.1:6850         ESTABLISHED
TCP    127.0.0.1:2267         127.0.0.1:2268         ESTABLISHED
TCP    127.0.0.1:2268         127.0.0.1:2267         ESTABLISHED
TCP    127.0.0.1:6850         127.0.0.1:2266         ESTABLISHED
TCP    127.0.0.1:22112        0.0.0.0:0              LISTENING
TCP    192.168.0.24:2258      104.17.107.108:443     ESTABLISHED
TCP    [::]:22                [::]:0                 LISTENING

我本来期望SSH的入站和出站都能正常工作,但现在只有出站没问题,入站完全被阻断,连本地ping都失败。真心希望大家能给点排查方向或者解决方案,谢谢了!

备注:内容来源于stack exchange,提问作者ryan arnold

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 07:34:30