top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Why i am getting “Paramiko : Error reading SSH protocol banner” in below code? What is the solution for it?

+2 votes
1,473 views

I have function in python,(Assume that i have imported all necessary module),

 def DL_Iperf(args):
        ssh=paramiko.SSHClient()
        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        ssh.connect(server_ip,username="root",password=Password)
some_code

This function is actually a thread and it will be created as many no of UE i have, (Ex: if i have 1 UE than 1 Thread will be created),

So, if i have 1 UE/ 2 UE than its working but if i have 3 UE then it is failing, with error "Paramiko : Error reading SSH protocol banner",

Below is the stderr of the script,

    No handlers could be found for logger "paramiko.transport"

    Unhandled exception in thread started by <function DL_Iperf at 0x02B8ACF0>
    Traceback (most recent call last):

    File "C:\Users\qxdm-5\Desktop\Chirag\LTE_11_Perfect_Working\TCP_Latest_2\Windo
    ws_UE\slave.py", line 379, in DL_Iperf

    ssh.connect(ServerIp,username="root",password=Pwd)

    File "build\bdist.win32\egg\paramiko\client.py", line 295, in connect

    File "build\bdist.win32\egg\paramiko\transport.py", line 451, in start_client

paramiko.SSHException: Error reading SSH protocol banner

From some reference i found that this is because of some network related issue, but my question is if it network related then why everytime in 3rd call of the function i am getting this error? And how do i resolve it?

posted Jun 16, 2015 by Chirag Gangdev

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
I dont have the complete code here, but let me comment that this issue is not with Paramiko or SSH daemon. It was simply a firewall configuration issue or if you need to load the private key then it may not be provided.

Similar Questions
0 votes

I am trying to create one SSH tunnel, so that i can connect from a python script running on my pc, to a remote MySQL database running on my Host and id like to stick with Python 3.3 .

I contacted my host and he informed me that this is the only way.

I tried pycrypto + paramiko but from what i have noticed, paramiko is not Python 3.3 ready. Any thoughts?

+2 votes

I am writing the code without main function.

#include<stdio.h>
_start()
{
int a=10,b=20,res;
res=a+b;
printf("Res = %d\n",res);
}

Compiling : cc -nostartfiles filename.c

Output:

Res = 30
Segfault
+2 votes

user:~$ kdenlive
qrc:/qml/kdenliveclipmonitor.qml:2:1: module "QtQuick.Controls.Styles" is not installed
qrc:/qml/kdenliveclipmonitor.qml:1:1: module "QtQuick.Controls" is not installed
qrc:/qml/kdenliveclipmonitor.qml:2:1: module "QtQuick.Controls.Styles" is not installed
qrc:/qml/kdenliveclipmonitor.qml:1:1: module "QtQuick.Controls" is not installed
Segmentation fault (core dumped)

0 votes

For testing purposes I want my code to raise a socket "connection reset by peer" error, so that I can test how I handle it, but I am not sure how to raise the error.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...