How To
How to Set up an FTP Server on the Raspberry Pi?

Raspberry Pi FTP Server: Many of the Raspberry Pi users want to transfer the files quickly and easily between the Raspberry Pi and the computer. You may install the Raspbian OS and just want a few of your key files. It is a very useful thing to learn how to set up the FTP server on the Raspberry Pi. With the File Transfer Protocol or SFTP (SSH File Transfer Protocol, also known as the Secure File Transfer Protocol). You can transfer files from the Raspberry Pi to your other computers and vice versa. It only takes some little set-up, but once running, it is a really efficient way to move the files back and forth.

For this setup, it is recommended to use the Raspbian OS on your Raspberry Pi, which makes the accessing of FTP much easy. It also means that you don’t necessarily have to install any external software. It comes with a program called SFTP-server from the OpenSSH suite. SFTP-Server is SFTP, rather than FTP, and that is a good thing. The old File Transfer Protocol leaves both the command and data channels unencrypted, which leaves the data vulnerable to exploits.
Related: How to Use Raspberry Pi as a Chromecast Alternative?
How to Set up an FTP Server on the Raspberry Pi? | Raspberry Pi FTP Server
Step 1: Enable SSH, at first, you have to make sure that the SSH (Secure Shell) is enabled. There are two different ways you can do this, and it doesn’t matter which one you can use.
Go to Preferences > Raspberry Pi Configuration and then click on the “Interfaces” tab. There, select “SSH: Enabled.”

Using Terminal
Open the Terminal and enter the following command:
sudo raspi-config
Then go to the Advanced Options and select SSH. The config shows you, “Would you like the SSH server to be enabled?” Now select “Yes.”

Now the SSH server is enabled and you can quit the config by selecting the “Finish.”

That’s all you needed to do to set up the server. Now you have completed half of the process.
Step 2: You now have the FTP server running on the Raspberry Pi, but to connect to that FTP server, you require an FTP client no
matter whatever device you are using to connect.
If you are using Windows PC, just go to FileZilla’s download page and install their software.
Now open the FileZilla. Enter the following information:

Host: Your public/private IP address. If you don’t know the public IP address, you can go to Google – or DuckDuckGo, (the default search engine on Raspbian) and type “what is my IP address.” If you are only going to use FTP connection from inside your home network, you can use the private IP address, which you can discover with this command:
hostname –I
Username: Your Raspberry Pi’s Default Username: pi
Password: Your Raspberry Pi’s Default Password: raspberry
Port: 22
After clicking the Quickconnect button, you can see the contents of the Raspberry Pi home directory (default home directory is /home/pi) on the right side of the FileZilla window.
That’s it! You are now ready to access and move files to and from your Raspberry Pi remotely.
Related: How to Set up a Raspberry Pi AirPlay Receiver?
Troubleshooting
If you cannot connect to the FTP server and are greeted with something like:
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to a server
Now you need to ensure that you have set up the port forwarding on your router, which means that you need your router to translate for you. One of the ports on the router has to correspond to that port 22 we set up, or else your server will be close to outside access. Using the SFTP-Server to set up your FTP Server provides access to the users with sufficient privileges. If you wish to give limited users the power to transfer the files and directories, then you have to do a lot more work. The Raspberry Pi Foundation has a perfect guide to that project.
Thank you for reading this post.
-
How To2 weeks ago
How to Setup and Watch IPTV on VLC Media Player [2023]
-
How To4 years ago
Rufus for Linux | How to Create a Bootable USB for Linux Using Rufus
-
Chromecast2 years ago
How to Stream IPTV on Chromecast [2022]
-
How To2 years ago
F4M Tester Kodi Addon – Step by Step Installation Guide (2022)
-
How To2 years ago
Uranus Kodi Addon – Install using Blamo Griffin Repository
-
How To12 months ago
Rufus for Mac: Best 4 Alternatives to Create a Bootable USB Drive
-
How To1 year ago
Placenta Kodi Addon – Step by Step Installation Guide [2022]
-
How To3 years ago
Gurzil Kodi Addon – How to Install Gurzil Addon in Kodi?