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?

2 Answers 2

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.

1
  • 1
    I am geting same error. but In my case host is amazon instance what should I do in that case
    – sagar
    Oct 23, 2013 at 8: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?

4
  • 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. Aug 27, 2011 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. Aug 29, 2011 at 18:30
  • Thanks, this fixed by problem too.
    – VKen
    Sep 4, 2014 at 9:29
  • you can change the parameter without editing transport.py: transport.banner_timeout = 300 Jan 9, 2018 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.