I created a complete ftp library some time ago. Now I want to connect to an sftp server. As far as I found out in my research this is not possible using ftplib. Nevertheless I tried to connect to an sftp only server and it worked without any problems. No error and no exception!
Now I'm a bit confused as I'm not sure if this really is a secure connection (wich is important for this application). Especially as I could not find similar cases online. Wich brings me to the followng questions:
server = 'host-adress'
user = 'username'
ftp = FTP(server)
*cmd* 'USER username'
*put* 'USER username\r\n'
*get* '331 Password required for username\n'
*resp* '331 Password required for username'
*cmd* 'PASS ********'
*put* 'PASS ********\r\n'
*get* '230 User username logged in\n'
*resp* '230 User username logged in'
FTP and SFTP are two completely different protocols. They have absolutely nothing in common. There's no chance you can connect with FTP library to SFTP server.
Your log is shows FTP protocol without any doubt.
Though you (our your host) may mistake SFTP with FTPS (FTP over TLS/SSL). For FTPS, just use
FTP_TLS instead of
FTP. The interface is the same (
FTP_TLS derives from