2

I'm trying to have many clients send files to a server all at once (or as fast as possible) but the server is getting too many requests at once as in the question Paramiko: Error reading SSH protocol banner. I've tried adding a banner_timeout so that the clients will try a little longer to connect to server, however, I get an error:

TypeError: connect() got an unexpected keyword argument 'banner_timeout'

Code:

import paramiko, os, time host_IP='192.168.1.1' port=22 transport=paramiko.Transport((host_IP,port)) transport.connect(username='username', password='password', banner_timeout=60) sftp=paramiko.SFTPClient.from_transport(transport) 

Perhaps I'm using the transport incorrectly?

5
  • paramiko.Transport.connect doesn't take banner_timeout argument. Commented Jan 17, 2017 at 19:56
  • Try using ssh=paramiko.SSHClient() ; ssh.connect(host, username = 'username', password = 'password', timeout = 60) Commented Jan 17, 2017 at 21:37
  • @boardrider Thanks! This allowed me to use the banner timeout and then open an sftp connection. Unfortunately, using banner_timeout option did not solve my underlying problem. Commented Jan 25, 2017 at 0:47
  • If you're unable to solve your banner_timeout, create a new SO question - and describe there what you tried, including a minimal reproducible example. Commented Jan 26, 2017 at 7:58
  • Also stackoverflow.com/help/someone-answers Commented Jan 26, 2017 at 22:34

1 Answer 1

2

You can set it like transport.banner_timeout = 60 before connecting.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.