Introduction to ftplib

Unlike SFTP, FTP uses the plaintext file transfer method. This means any username or password transferred through the wire can be detected by an unrelated third party. Even though FTP is a very popular file transfer protocol, people frequently use this to transfer a file from their PCs to remote servers.

FTPlib is a Python library that will allow us to connection to an FTP server from a script. To begin, we must have installed Python in our operating system and the FTPLib package. We can install them on a Linux system in two ways:

 pip install ftplib apt-get install python-ftplib

In Python, ftplib is a built-in module that's used to transfer files to and from the remote machines. You can create an anonymous FTP client ...

Get Learning Python Networking - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.