title: Telnet with ipaddress and port in Python
body: <p>I need to login into remote server with IP address and Port.</p>
  
  <pre><code>import telnetlib
  
  try:
      conn = telnetlib.Telnet("IPaddress", "Port")
      response = 'Success'
  except:
      response = 'Failed'
  finally:
      print(response)
  </code></pre>
  
  <p>Connection is getting success. But while trying to see the configuration of the server using the below command, getting error message.</p>
  
  <pre><code>print(conn.read_all())
  </code></pre>
  
  <blockquote>
    <p>Welcome to xxx version: 3.2.28.38</p>
    
    <p>Built: 20/10-2016 at 14:56</p>
    
    <p>Unauthorized access prohibited</p>
    
    <p>uclibc login: </p>
    
    <p>Login timed out after 60 seconds.</p>
  </blockquote>