0

I am trying to use below code to connect to FTP server over explicit TLS/SSL encryption. It fails at line 2 with error "ConnectionResetError: [Errno 104] Connection reset by peer". Has anyone else faced this? any suggestions on how to fix this?

Note- this fails at line 2 so not even able to connect to FTP server. I have seen some posts where this similar error message shows up while uploading file but this error is different in my opinion.

from ftplib import FTP_TLS
ftps = FTP_TLS('ftp.MySite.com')
# login after securing control channel
ftps.login('testuser', 'testpass')           

ftps.prot_p()          
ftps.retrlines('LIST')
ftps.close()
PythonDeveloper
  • 289
  • 1
  • 4
  • 24
  • 1
    Not clear if it is the same bug. But - error message is the same and there are no details in your questions which suggest that the situation is different than in in the already existing question. – Steffen Ullrich May 03 '23 at 18:10

0 Answers0