Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paramiko Error: Error reading SSH protocol banner

I'm using Fabric for my build script. I just cloned one of my VMs and created a new server. The Fabric script (which uses paramiko underneath) works fine one server but not the other. Since it's a clone I don't know what could be different but everytime I run my Fabric script I get the error Error reading SSH protocol banner. This script is connecting with the same user on both servers. The script works fine on all other servers except this new one that I just clones. The only thing that is radically different is the IP address which is totally different range.

Any ideas on what could be causing this?

like image 264
Mridang Agarwalla Avatar asked Aug 26 '11 14:08

Mridang Agarwalla


People also ask

What is SSH banner timeout?

banner_timeout - an optional timeout (in seconds) to wait for the SSH banner to be presented. timeout - an optional timeout (in seconds) for the TCP connect. auth_timeout - an optional timeout (in seconds) to wait for an authentication response.

What is Paramiko SSH?

Paramiko is a Python library that makes a connection with a remote device through SSh. Paramiko is using SSH2 as a replacement for SSL to make a secure connection between two devices. It also supports the SFTP client and server model.

What is Paramiko transport?

An SSH Transport attaches to a stream (usually a socket), negotiates an encrypted session, authenticates, and then creates stream tunnels, called channels , across the session. Multiple channels can be multiplexed across a single session (and often are, in the case of port forwardings).


1 Answers

This issue didn't lie with Paramiko, Fabric or the SSH daemon. It was simply a firewall configuration in ISPs internal network. For some reason, they don't allow communication between different subnets of theirs.

We couldn't really fix the firewall configuration so instead we switched all our IPs to be on the same subnet.

like image 76
Mridang Agarwalla Avatar answered Sep 18 '22 13:09

Mridang Agarwalla