python paramiko Error reading SSH protocol banner问题的解决
2017-10-11 10:46
1326 查看
最近在做项目迁移的过程中, 在用Python的paramiko模块连接SFTP的时候遇到了Error reading SSH protocol banner的问题。将解决的过程记录下。
这个错误出现在服务器接受连接但是ssh守护进程没有及时响应的情况(一般是15s).
要解决这个问题, 需要将paramiko的响应等待时间调长。
修改paramiko/transport.py文件中的
self.banner_timeout
值, 将其设为300或者其他较长的值即可解决这个问题。
参考:
- stackoverflow
- 腾讯云
这个错误出现在服务器接受连接但是ssh守护进程没有及时响应的情况(一般是15s).
要解决这个问题, 需要将paramiko的响应等待时间调长。
修改paramiko/transport.py文件中的
self.banner_timeout
值, 将其设为300或者其他较长的值即可解决这个问题。
参考:
- stackoverflow
- 腾讯云
相关文章推荐
- python paramiko ssh-解决强制修改密码登录问题
- python: IndentationError: expected an indented block问题解决
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- python问题:IndentationError:expected an indented block错误解决
- Sublime2编译Python程序EOFError:EOF when reading a line解决方法
- python subprocess命令行调用py文件 报错EOFError: EOF when reading a line (已解决)
- python 第三方 .whl包安装及出现的IOError问题解决办法
- 解决Python中TypeError: unbound method 问题
- python问题:IndentationError:expected an indented block错误解决
- VSS 提交大文件出现 error from reading file 问题解决!
- Error reading from file VSS问题解决
- Python安装模块出现问题UnicodeDecodeError的解决方法
- python UnicodeEncodeError 问题解决
- python问题:IndentationError:expected an indented block错误解决
- python32版本,出现问题“struct.error: argument for 's' must be a bytes object”的解决办法
- python问题:IndentationError:expected an indented block错误解决 .
- Win7 64位编译Python扩展解决”error: Unable to find vcvarsall.bat”问题
- 已解决】Sublime中运行带input或raw_input的Python代码出错:EOFError: EOF when reading a line(转)