Sending Files Between Computers in the 21st Century
Fragmentation of technology and vendor-lock makes it difficult to copy files between machines we legally own. The article shares a few possible ways and tools to tackle this problem.
Join the DZone community and get the full member experience.Join For Free
A simple task: copy a file from one machine to another. Not easy, as it turns out to be. We're now 20 years into the 21st century and these things are as tedious as ever. I have found and used a few tools which make it much easier.
Fragmentation of technology and vendor-lock makes it difficult to copy files between machines we legally own.
Copying a file from one machine to another can be a discouraging experience. Our households are often a hybrid mix of technologies and platforms. Around here we have two Linux laptops, a MacOS desktop, two Android phones, one Android tablet, an iPad, a bunch of Raspberry PIs, and an Onion Omega2 clock. These days it's nothing unusual. Now imagine the following challenge: take a picture with the phone then copy it to every other device.
I'd eventually succeed, but only by clicking a lot, using a mix of techniques, and it's not easy. Unfortunately, particular interests and profit-first mentality is still defined how we're allowed to use our computers.
What I Need
As a software developer, I find myself in constant need of copying files between variety of machines and platforms. I wish it was as simple as this:
- Pick a file
- Point to a machine on my LAN
- Press SEND
- On the target machine, press RECEIVE
Simply put - no public technology exists which:
- Covers all popular platforms and OSes
- Is this simple in use
- Does not force me to give up my privacy
Let's see what's available:
Proprietary clouds are neither simple nor intuitive, as any senior will attest. Then, why on Earth do I need to upload my files to Google and grant them full access, if target machine is right next to me, on the same LAN?
Some of you might remember a predecessor of Microsoft OneDrive, called Windows Mesh. This little-known brilliant software was in many ways superior to OneDrive. The best feature for me was its ability to sync files between machines in P2P mode. Cloud storage was there, but it was fully optional. A little bonus was ability to remotely log on to all my PCs via web RDP client. The product has been killed in 2012 and replaced by dumbed-down SkyDrive (nowadays OneDrive). To back up a large number of files, you'd now have to buy storage if you need it or not.
We send people into space, quantum computing is coming, but a LAN connecting a mix of Windows, Mac, Linux, Android, and iOS devices seems to be a technological impossibility. The protocols are there (SMB?), but there's lack of interest between vendors, in computers talking to each other on LAN, without anyone peeking.
As unreliable as it ever was.
There is such a thing. I think my Canon Selphy printer uses WiFi direct and it works smooth. But I've never seen it working with files.
Try stick one into an iPad (not possible without adapter?) and see how it allows you copy files from it. It's not just about vendor lock. Even within the same ecosystems things are difficult. Access from iPad to iMac shared folders is buried deeply, while no solution exists for other way around. They recommend that you use iCloud instead.
Yes, we still e-mail files to ourselves. Slow, limited, but often the only way.
Run Your Own Cloud
As a matter of fact, I run one, a NextCloud instance on a Linux VPS. Awesome as it is and supported on all platforms, this is not a solution for the masses.
My Ways to Handle It
A while ago I've discovered SnapDrop. It's an easy way of sending files on LAN. Inspired by AirDrop but it works cross-platform.
How it works? Open the website on both machines. They're given random names. Click on target machine, select a file to send, confirm download on target machine, done. This is as good experience as it gets! I was able to successfully transfer files between all my machines in all permutations - Android to Linux, iMac to Android, etc.
To allay security concerns: all communication goes over LAN in P2P mode, while SnapDrop service is only used to establish a P2P connection. If you're cautious, you can download the application and run it locally, for example on a spare Raspberry PI web server. Check https://github.com/RobinLinus/snapdrop for details.
Between Remote Machines
Sometimes I need to copy a file from local machine to a remote server. SSH/SCP works but is not always available. Using SnapDrop can be a problem in the lack of GUI.
I found a simple and efficient solution - enter The Magic Wormhole. It allows transferring files using a P2P connection from command line. Install it on source and target machines with package manager of your choice, i.e.
Initiate file transfer by running `wormhole send` command, i.e:
The connection is made with relay server and file transfer is assigned with a unique identifier. As instructed, on target machine run `wormhole receive `command, i.e.:
The transfer will commence and the file will be saved in the current folder. That's all! Similar to SnapDrop, you can run your own relay server if you don't trust the public relay by the creators of the application. Additionally, Magic Wormhole can transfer files via TOR network if you need an extra level of security and anonymity.
Mount Remote Filesystem With SSHFS
Mac and Linux computers can connect to each other easily with SSH. Using sshfs I can securely mount remote folders, browse them freely and copy files. To speed things up I have these handy bash scripts for my popular destinations, such as. /usr/local/bin/macbook which does the following:
I use SSH keys to provide seamless authentication. Now, whenever I need to access files on the Macbook, I run macbook and I can see my Macbook home folder right under ~/macbook/tomasz. I don't know whether there's anything like that to connect to a Windows machine.
I'm sure there are many other ways to cope with the problem of copying files between computers. If you have something interesting, let me know in the comments! It is sad though, that we have to resort to such hacks. There's absolutely no technical reason for major platform vendors to not agree on a solution that would be safe, simple, and open. But until this happens, we have to keep hacking our ways :)
Published at DZone with permission of Tomasz Waraksa. See the original article here.
Opinions expressed by DZone contributors are their own.