[错误解决]paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 设置
报错信息
上午的时候数据组的同事跟我说有几个程序报错,经过查看log发现找到报错信息:
paramiko.ssh_exception.SSHException: Error reading SSH protocol banner
经过搜索,得知引起该错误的原因是因为banner_timeout默认设置太短,只有15s。
错误分析
经查看paramiko库下面的transport.py下面的Transport代码如下:
class Transport(threading.Thread, ClosingContextManager):
self.banner_timeout = 15
# how long (seconds) to wait for the handshake to finish after SSH
重设banner_timeout属性值
网上的方法大多数是修改源码,重新安装,感觉略麻烦。这里在代码里面进行属性重新设置。
transport = paramiko.Transport((self.host, self.port))
print(transport.banner_timeout)
transport.banner_timeout = 30
print(transport.banner_timeout)
经过测试,两次打印出来的属性值不同,说明属性设置成功,问题解决。
[错误解决]paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 设置的更多相关文章
- SSHException: Error reading SSH protocol banner
当我在使用ssh 远程connect 另一台机器的server 时出现了错误,错误如下,起初以为是自己代码写的有问题,后来本地了一下看了跑的没问题,我就开始根据报错去查寻原因, 起初在论坛博客看到这 ...
- MySQL错误日志显示(Got an error reading communication packets)的问题
错误显示: 2019-05-28T12:54:08.267934+08:00 820396 [Note] Aborted connection 820396 to db: 'Databaseplatf ...
- IIS错误解决办法(HTTP Error 500.19 - Internal Server Error)
window10 切换登陆用户,VS2015的IIS Express 调试代码报HTTP Error 500.19 - Internal Server Error 错误,无法读取配置文件解决办法. I ...
- Python paramiko 报错 paramiko.ssh_exception.SSHException: not a valid RSA private key file
报错的原因是选择的文件不是一个有效的 RSA 密钥文件 现在通过 ssh-keygen 默认生成的密钥文件是新的格式,并非 RSA 格式.打开文件可以看到是以 -----BEGIN OPENSSH P ...
- 【Loadrunner】Error -26601: Decompression function 错误解决、27728报错解决方案
一. Error -26601: Decompression function 错误解决 Action2.c(30): Error -26601: Decompression function ...
- 史上最详细 Python第三方库添加方法 and 错误解决方法
(1):如何添加python第三方库(方法一): File ->> Settings... ->> Project Interpreter (2):如何添加python第三方库 ...
- org.hibernate.id.IdentifierGenerationException错误解决方法
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before ...
- ssh超时时间设置(设置ClientAliveInterval),附SSH超详细参数
作者: daodaoliang 版本: V 0.0.1 日期: 2016年12月29日 0x00 OpenSSH 简介 OpenSSH是采用SSH协议实现的重要的远程连接工具,它对所有的数据进行加密以 ...
- vss error reading from file 解决方法
vss error reading from file 解决方法 1 若服务器中存在 vss/data/backup目录,请将该目录删掉2 运行cmd cd.. cd C:\Program Files ...
随机推荐
- oracle 11g r2卸载
1. 进入计算机管理>>服务里,停止所有oracle的服务 2. 开始菜单>>程序>>Oracle>>Oracle安装产品>>Univers ...
- [Git] Create a new repository on the command line
echo "# xxx" >> README.md git init git add README.md git commit -m "first commi ...
- linux 命令——55 traceroute(转)
通过traceroute我们可以知道信息从你的计算机到互联网另一端的主机是走的什么路径.当然每次数据包由某一同样的出发点(source)到达某一同样的目的地(destination)走的路径可能会不一 ...
- IOS 监听slider滑动
// 监听slider滑动 - (IBAction)valueChnage:(UISlider *)sender; @property (weak, nonatomic) IBOutlet NJVie ...
- Miller-Rabbin 素性测试 和 Pollard_rho整数分解
今天学习一下Miller-Rabbin 素性测试 和 Pollard_rho整数分解. 两者都是概率算法. Miller_Rabbin素性测试是对简单伪素数pseudoprime测试的改进. (ps ...
- 配置dubbo架构的maven项目
1. 拆分工程 1)将表现层工程独立出来: e3-manager-web 2)将原来的e3-manager改为如下结构 e3-manager |--e3-manager-dao |--e3-manag ...
- Activiti学习记录(二)
1.初始化数据库 使用工作流引擎创建23张表 public class TestActiviti { /** * 使用代码创建工作流需要的23张表 */ @Test public void creat ...
- JavaScript中的confirm的用法
confirm()方法用于显示一个带有指定消息和ok以及取消按钮的对话框confirm(message,ok,cancel); message:表示在弹出框的对话框中现实的文本信息如果用户点击确定按钮 ...
- SQL查询出每门课都大于80 分的学生姓名
Course表如下: 查询出每门课都大于80 分的学生姓名有两种方法. 1.select distinct name from Course where name not in (select di ...
- 去除myeclipse中doget和dopost方法中的注释
当我们使用myeclipse新建servlet时发现doget和dopost方法中有一些无用的注释,每次新建一个servlet时都要手动删除特别麻烦. 下面就教大家如何去除这些注释! 以myeclip ...