title: Python - [SSL: DH_KEY_TOO_SMALL] dh key too small
body: <p>I have python script which uses FTP_TLS to get access to FTPS server. When I try to do_handshake next error appears:</p>
  <pre><code>  File &quot;/usr/local/lib/python3.7/ftplib.py&quot;, line 749, in login
      self.auth()
    File &quot;/usr/local/lib/python3.7/ftplib.py&quot;, line 761, in auth
      server_hostname=host)
    File &quot;/usr/local/lib/python3.7/ssl.py&quot;, line 423, in wrap_socket
      session=session
    File &quot;/usr/local/lib/python3.7/ssl.py&quot;, line 870, in _create
      self.do_handshake()
    File &quot;/usr/local/lib/python3.7/ssl.py&quot;, line 1139, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1076)
  </code></pre>
  <p>My script:</p>
  <pre><code>ftp = FTP_TLS()
  ftp.connect(host, port)
  ftp.login(user, passwd)
  ftp.prot_p()
  </code></pre>
  <p>Is there any way to turn off this warning or change some ciphers?</p>