**问题描述:**
- 使用 VS Code 通过 Remote-SSH 连接远程服务器时,终端无法响应,查看VS Code 中的 **Remote-SSH 日志**出现 `client_loop: ssh_packet_write_poll` 错误。
- 使用其他电脑连接正常,本机无法连接。
**解决方案:**
1. **问题根源**:Windows 自带的 OpenSSH 客户端与 VS Code 的兼容性问题,导致远程连接时 SSH 无响应。
2. **解决步骤**:
- 手动修改 VS Code 的 `settings.json` 配置文件,指定使用 **Git for Windows** 附带的 `ssh.exe` 客户端。
3. **操作步骤**:
- 打开 `settings.json` 配置文件,路径如下
`C:\Users\20949\AppData\Roaming\Code\User\settings.json`
- 在文件中添加以下内容:
```json
{
"remote.SSH.remotePlatform": {
"connect.nmb2.seetacloud.com": "linux"
},
"remote.SSH.path": "C:\\Program Files\\Git\\usr\\bin\\ssh.exe"
}
```
4. **注意事项**:
- 如果没有安装 Git for Windows,可以从 [Git 官网](https://gitforwindows.org/) 下载并安装。
- 确保路径 `C:\\Program Files\\Git\\usr\\bin\\ssh.exe` 是正确的,使用 `where ssh` 命令确认。