本文介绍了python paramiko 模块 socket.error, errno 10060的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎通过 paramiko (v1.10.0) 的套接字连接不稳定.

It seems the socket connection through paramiko (v1.10.0) is not stable.

我有两台电脑.python 代码在 PC 上.连接有时成功,有时不成功(相同代码).当 PC paramiko 代码失败(socket.error, 10060)时,我使用我的 Mac 通过终端 ssh 登录服务器,一切正常.

I have two computers. The python code is on the PC one. The connection sometime is successful and sometime is not (Same code). When the PC paramiko code fails (socket.error, 10060), I use my Mac via terminal ssh login the server and everything is fine.

我在代码中使用了 set_missing_host_key_policy.但我猜 Mac 有关键.我第一次登录时输入yes.

I use set_missing_host_key_policy in the code. But the Mac has the key I guess. I typed yes when login at the first time.

如果连接不稳定是由热键引起的,如何获取主机密钥?从服务器还是我本地文件夹(win7)中的某个地方?

If the unstable connection is caused by the hotkey, how do I get the host key? From the server or somewhere in my local folder (win7)?

推荐答案

尝试关闭 Windows 防火墙.这是网络错误,应该不是因为 SSH 密钥问题.

Try switching off Windows firewall. It's a network error, it should not be because of SSH key problems.

错误代码 10060:连接超时背景:网关无法从您尝试访问的网站收到及时响应.这可能表示网络拥塞,或者网站遇到技术问题.

这篇关于python paramiko 模块 socket.error, errno 10060的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 04:51