更改计算机名称后登录时 Windows 10 SSH 服务器“权限被拒绝”

更改计算机名称后登录时 Windows 10 SSH 服务器“权限被拒绝”

我在 Windows 10 上运行 SSH 服务器,该服务器运行良好,直到我更改了计算机名称。从那时起,我就无法通过 SSH 登录。

我尝试删除Users\username\.ssh服务器和客户端计算机上的文件夹,以强制其重新创建公钥以及重新安装 OpenSSH 服务器。尝试使用从服务器本身进行连接时ssh username@localhost出现“权限被拒绝”的情况。

我在服务器的防火墙上有一个允许 OpenSSH 服务器的规则。

我检查了服务器上的端口是否打开,Test-NetConnection -Port 22 -ComputerName ip.of.server -InformationLevel Detailed并得到:

ComputerName            : ip.of.server
RemoteAddress           : ip.of.server
RemotePort              : 22
NameResolutionResults   : ip.of.server
                          HOME
MatchingIPsecRules      :
NetworkIsolationContext : Private Network
IsAdmin                 : False
InterfaceAlias          : Ethernet
SourceAddress           : ip.of.client
NetRoute (NextHop)      : 0.0.0.0
TcpTestSucceeded        : True

还有什么想法可以尝试吗?

相关内容