Sharing files and folders over a local network is one of the first things we wanted to do with a Raspberry Pi computer. There are many, many routers out there and many, many different default options. Because of that, we think file- and folder-sharing software Samba is not always reliable option (but if it works on your network, more power to you).
This file- and folder- sharing technique uses SSH credentials for the Raspberry Pi. Be careful who you share these credentials with!
Instead of using Samba, we decided to use SFTP, an SSH extension for secure file transfer.
Enable/Disable command line access to your Pi using SSH.
Now that your Pi has restarted, both SSH and SFTP should be running in the background. Let's find out where it is on our network with the
ifconfig command in the terminal.
You should be able to find your IP address in the
inet field under the corresponding network adapter:
eth0 if your Raspberry Pi is wired to your router,
wlan0 if you are using WiFi. It will look like a string of numbers like
184.108.40.206. Write that IP address down, we'll be using it in to connect to our Pi in a moment!
Your Pi is now running a SFTP server: we are going to use a SFTP client to access it.
You should now be logged in to your Raspberry Pi, and be able to access all the file and folders you need from there: you can drag and drops to and from your Raspberry Pi directly using the FileZilla client. Congratulations!How do we use it?
We use Raspberry Pis to host a lot of music and video files at the studio. An easy way to use this method to stream media files is to:
Copy URL(s) to clipboard.
Open location from clipboard(the URL will likely already be filled in, but paste it yourself if needed).
Enqueue, your choice.