title: Python FTP: "TimeoutError: [Errno 110] Connection timed out" but I can connect with sftp in terminal
body: <p>I'm getting error while connecting to FTP in Python:</p>
  <pre class="lang-none prettyprint-override"><code> server.connect('68.183.91.171')
    File &quot;/usr/lib/python3.6/ftplib.py&quot;, line 152, in connect
      source_address=self.source_address)
    File &quot;/usr/lib/python3.6/socket.py&quot;, line 724, in create_connection
      raise err
    File &quot;/usr/lib/python3.6/socket.py&quot;, line 713, in create_connection
      sock.connect(sa)
  TimeoutError: [Errno 110] Connection timed out
  </code></pre>
  <p>My code:</p>
  <pre><code>import ftplib
  server = ftplib.FTP()
  server.connect('68.183.91.171')
  server.login('root','password')
  server.dir()
  </code></pre>
  <p>I think the connection settings are correct as I can connect in terminal with</p>
  <pre class="lang-none prettyprint-override"><code>sftp 68.183.91.171
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Gajp9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gajp9.png" alt="enter image description here" /></a></p>