title: HandlerSSHTunnelForwarderError with SSHTunnelForwarder
body: <p>I am trying to connect to my remote postgres db as follows:</p>
  
  <pre><code>from sshtunnel import SSHTunnelForwarder #Run pip install sshtunnel
  from sqlalchemy.orm import sessionmaker #Run pip install sqlalchemy
  
  with SSHTunnelForwarder(
      ('10.160.1.24', 22), #Remote server IP and SSH port
      ssh_username = "&lt;usr&gt;",
      ssh_password = "&lt;pwd&gt;",
      remote_bind_address=('10.160.1.24', 5432),
      local_bind_address=('127.0.0.1', 3334)
      ) as server:
  
      server.start() #start ssh sever
      print 'Server connected via SSH'
  
      #connect to PostgreSQL
      local_port = str(server.local_bind_port)
      engine = create_engine('postgresql://&lt;db_user&gt;:&lt;db_pwd&gt;@127.0.0.1:' + local_port +'/&lt;db_name&gt;')
  
      Session = sessionmaker(bind=engine)
      session = Session()
  
      print 'Database session created'
  
      #test data retrieval
      test = session.execute("SELECT * FROM &lt;table_name&gt;")
  </code></pre>
  
  <p>This is the output that I see:</p>
  
  <pre><code>File "/Library/Python/2.7/site-packages/sshtunnel.py", line 299, in handle
  raise HandlerSSHTunnelForwarderError(msg)
  HandlerSSHTunnelForwarderError: In #1 &lt;-- ('127.0.0.1', 54265) to ('10.160.1.24', 5432) failed: ChannelException(2, 'Connect failed')
  </code></pre>
  
  <p>Any idea what I am doing wrong? I am able to connect to the postgresdb by running the command <code>ssh -L 3334:localhost:5432 Administrator@10.160.1.24</code> in a seperate terminal and then connecting to the db at localhost:3334.</p>