diff --git a/wally/ssh_utils.py b/wally/ssh_utils.py
index e77b9a8..fa33d46 100644
--- a/wally/ssh_utils.py
+++ b/wally/ssh_utils.py
@@ -116,7 +116,11 @@
         try:
             tleft = etime - time.time()
             c_tcp_timeout = min(tcp_timeout, tleft)
-            c_banner_timeout = min(banner_timeout, tleft)
+
+            if paramiko.__version_info__ >= (1, 15, 2):
+                banner_timeout = {'banner_timeout': min(banner_timeout, tleft)}
+            else:
+                banner_timeout = {}
 
             if creds.passwd is not None:
                 ssh.connect(creds.host,
@@ -126,7 +130,7 @@
                             port=creds.port,
                             allow_agent=False,
                             look_for_keys=False,
-                            banner_timeout=c_banner_timeout)
+                            **banner_timeout)
             elif creds.key_file is not None:
                 ssh.connect(creds.host,
                             username=creds.user,
@@ -134,7 +138,7 @@
                             key_filename=creds.key_file,
                             look_for_keys=False,
                             port=creds.port,
-                            banner_timeout=c_banner_timeout)
+                            **banner_timeout)
             elif (creds.host, creds.port) in NODE_KEYS:
                 ssh.connect(creds.host,
                             username=creds.user,
@@ -142,7 +146,7 @@
                             pkey=NODE_KEYS[(creds.host, creds.port)],
                             look_for_keys=False,
                             port=creds.port,
-                            banner_timeout=c_banner_timeout)
+                            **banner_timeout)
             else:
                 key_file = os.path.expanduser('~/.ssh/id_rsa')
                 ssh.connect(creds.host,
@@ -151,7 +155,7 @@
                             key_filename=key_file,
                             look_for_keys=False,
                             port=creds.port,
-                            banner_timeout=c_banner_timeout)
+                            **banner_timeout)
             return ssh
         except paramiko.PasswordRequiredException:
             raise
