Recently, I made a code that connect to work station with different usernames (thanks to a private key) based on paramiko.
I never had any issues with it, but today,
Adding to the answers above, suggesting to edit transport.py: you don't have to do that anymore.
Since Paramiko v. 1.15.0, released in 2015, (this PR, to be precise) you can configure that value when creating Paramiko connection, like this:
client = SSHClient()
client.connect('ssh.example.com', banner_timeout=200)
In the current version of Paramiko as of writing these words, v. 2.7.1, you have 2 more timeouts that you can configure when calling connect method, for these 3 in total (source):
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 connectauth_timeout - an optional timeout (in seconds) to wait for an authentication response.