summaryrefslogtreecommitdiffhomepage
path: root/paramiko/transport.py
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko/transport.py')
-rw-r--r--paramiko/transport.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index ad245a69..9f5c7098 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -951,6 +951,18 @@ class Transport (threading.Thread):
return None
return self.auth_handler.get_username()
+ def get_banner(self):
+ """
+ Return the banner supplied by the server upon connect. If no banner is
+ supplied, this method returns C{None}.
+
+ @return: server supplied banner, or C{None}.
+ @rtype: string
+ """
+ if not self.active or (self.auth_handler is None):
+ return None
+ return self.auth_handler.banner
+
def auth_none(self, username):
"""
Try to authenticate to the server using no authentication at all.