Here we are transferring the file with an SFTP client called FileZilla. FileZilla Client is a free, open source and multiplatform FTP client that supports SFTP. You can download and install it here: http://filezilla-project.org.
Once you have installed and executed FileZilla Client, you must follow the next steps to add the SFTP server running on the board in with the application’s Site Manager:
1. Select File | Site Manager.
2. Click New Site on the Site Manager dialog box. Enter the desired name, such as IntelGalileo2 to easily identify the board’s SFTP service.
3. Enter the board’s IP address in Host. You don’t need to enter any value in Port because the SFTP server uses the default SFTP port, that is, the same port in which the SSH daemon listens: port 22.
4. Select SFTP – SSH File Transfer Protocol in the Protocol dropdown.
5. Select Normal in the Logon Type dropdown.
6. Enter root in User. The next screenshots shows the configuration values for a board that has 192.168.1.107 as its assigned IP address.
7. Click Connect. FileZilla will display an Unknown host key dialog box, indicating that the server’s host key is unknown. It is similar to the information provided when you established the first connection to the board with an SSH client. The details include the host and the fingerprint. Activate the Always trust this host, add this key to the cache checkbox and click OK.
8. FileZilla will display the /home/root folder for the Yocto Linux running on the board at the right-hand side of the window, under Remote Site.
9. Navigate to the folder in which you saved the Python files you want to transfer in your local computer under Local site.
10. Select the file you want to transfer and press Enter to transfer the file to the /home/root folder on the board. Another way is to right-click on the desired file and select Upload. FileZilla will display the uploaded file in the /home/ root folder under Remote Site. This way, you will be able to access the Python file in the default location that Yocto Linux uses when you login with an SSH terminal, that is, in your home folder for your root user. The following picture shows many Python files uploaded to the /home/root folder with FileZilla and listed in the contents of the /home/root folder.
The next time you have to upload a file to the board, you don’t need to setup a new site in the Site Manager dialog box in order to establish an SFTP connection. You just need to select File | Site Manager, select the site name under Select Entry and click Connect.