6

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?

Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382

2 Answers2

8

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.

Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
  • 1
    I am geting same error. but In my case host is amazon instance what should I do in that case – sagar Oct 23 '13 at 08:25
3

Try changing the banner timeout from 15 seconds to 30 secs in the transport.py file. Also, it could be that the sshd daemon on the server is hung. Can you SSH into it manually?

Gabriel Ross
  • 5,168
  • 1
  • 28
  • 30
  • I edited transport.py and changed the timeout to 30 seconds but it didn't help. I can SSH to the server manually and execute all the commands. Weird issue. – Mridang Agarwalla Aug 27 '11 at 11:34
  • I just ran a traceroute from my Fabric server to the Server A and Server B. The traceroute of Server A went just fine and the script works just fine too but the traceroute of Server B showed me 28 of these unknown host things `* * *`. The IPs of both servers belong to same ISP the only thing different is the class. – Mridang Agarwalla Aug 29 '11 at 18:30
  • Thanks, this fixed by problem too. – VKen Sep 04 '14 at 09:29
  • you can change the parameter without editing transport.py: `transport.banner_timeout = 300` – törzsmókus Jan 09 '18 at 15:36