[Python] Correctly using banner_timeout in paramiko

Discussão em 'Python' iniciado por Stack, Novembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    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?

    Continue reading...

Compartilhe esta Página