In this tutorial, we’ll learn how to connect over FTPS on Ubuntu. FTPS is an abbreviation of multiple terms – “FTP over TLS”, “FTP Secure”, “FTP+SSL” in Ubuntu.
Installing FileZilla and connecting over FTPS (GUI)
The most popular FTP client is FileZilla, not only FTP, but it also supports FTPS, FTPES, SFTP. It is a free cross-platform software, easy to use and install.
You can easily install it by using the apt command:
sudo apt install filezilla
Now you easily search for FileZilla in your Applications,
Click to open it.
FileZilla has a very easy to use interface, to connect over FTPS, make sure you add ftps:// followed by the hostname (e.g. ftps://ftps.example.com).
Generally by default the FTPS port is 990, but incase it’s different you need to mention it with other credentials.
Connecting over FTPS on Ubuntu using lftp (Terminal)
The ftp package which comes pre-installed with Ubuntu Server, does not support FTPS. So we will use lftp to connect over FTPS in Ubuntu.
lftp is a sophisticated file transfer program which not only supports FTPS but also FTP, HTTP, HTTPS, HFTP, FISH, SFTP and file. You can read more about lftp by executing the following command to open up it man page:
1. Installing lftp on Ubuntu
We’ll make use of apt command with sudo command to install lftp, as stated below:
sudo apt install lftp
2. Connecting and performing basic commands with lftp on FTPS
To connect to any FTPS server simply run:
lftp -u myuser ftps://ftps.example.com
To understand the basic functionality, we’ll list remote files then change active directory, then we’ll transfer a file from the local machine and rename it, then we’ll create a new directory and in the end we’ll download the file to the local machine and delete the file.
To get list of the remote files, enter ls command in lftp‘s interactive shell:
We can see a directory named remotedir. Next, we’ll change the active remote directory with cd:
Now we’ll transfer a local file to the remote server with put command:
This command will transfer your local test.txt file from your current active local directory to the current active remote directory as test.txt.
Now to rename any file in remote directory, we can make use of mv command:
mv test.txt newtest.txt
This will rename test.txt to newtest.txt,
Now we’ll create a new remote directory with the mkdir command:
This command will create a new remote directory called newdir.
Now to download the file from the remote server, we’ll use the get command:
This will download the newtest.txt file in remotedir on the remote server to the active directory on the local machine. Now to delete a remote file, we’ll use the rm command:
This will remove a file named newtest.txt in the active remote directory,
And, similarly to remove a remote directory, we’ll use rmdir command:
This will remove a remote directory called newdir in the active remote directory.
There are plenty of ways to connect over the FTPS on Ubuntu, but the most popular and easy way is FileZilla when it comes to GUI and, through lftp when it comes to terminal. We hope you enjoyed reading this article as much as we did writing it. Happy Learning!