It may be very interesting to be able to connect in FTP (File Transfer Protocol) to a Raspberry Pi. For example, when you have its own box DIY Home Automation, it’s a good way to make a backup of the database or the configuration of its automation software files. Conversely, an FTP connection will easily restore a backup in case of failure of the SD Card of the Raspberry Pi.
Enable SSH access on Raspbian
Easier for access to FTP from the Raspberry and use the SFTP secure connection (SSH File Transfer Protocol) proposed by the SSH protocol. Using a secure SSH connection, you will have to install and update FTP server (which is always a potential security hole).
On Raspbian you can activate from the Control Panel Configuration of the Raspberry Pi located in Menu-> Preferences. Then in the tab interfaces , select SSH . Restart the Pi for the change to take effect.
You can also access the configuration utility of the Raspberry from the Terminal with the command
To learn more about the use of SSH, you can read this previous article.
Before going further, you will need to know the IP address of the Raspberry. To do this, open a Terminal and enter the following command
If the RPI is connected to WiFi, the IP address is in the block wlan0. In Ethernet, the IP address is located in the block eth0.
FileZilla (macOS, Windows, Linux)
FileZilla is the best-known solution. You can recover FileZilla on the here project official site. Open source, FileZilla is free. It consists of some (only available for Windows) server, and a client. FileZilla is available for macOS, Windows 32-bit, 64-bit Windows and Linux.
Once installed on your computer, start FileZilla. Set up the connection like this:
- host : ip address of the Raspberry
- ID : default IP
- password: the password of the user IP. Default raspberry
- Port: 22 (SSH port)
- press quick connect
after a few seconds, you are connected to your Raspberry. I for example logged in my server automation Domoticz. It is very easy to file or retrieve scripts Lua or Python in this way to edit with a text editor.
Winscp is a free FTP client ( project page) able to connect by SFTP also. The configuration is identical to FileZilla.
Accept the SSH key
Once connected, we find left my computer and right tree of the Raspberry Pi.