Skip to main content

Sending Files Between Computers in 21st Century

Introduction

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.

TL;DR

Fragmentation of technology and vendor-lock makes it difficult to copy files between machines we legally own.

The Challenge

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 still defines 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

That’s all.

Mission Impossible

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:

Cloud

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 backup a large amount of files you’d now have to buy storage, need it or not.

LAN

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 simply lack of interest between vendors, in computers talking to each other on LAN, without anyone peeking.

Bluetooth

As unreliable as it ever was.

WiFi Direct

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.

USB Stick

Try stick one into an iPad 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.

E-mail

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

Within LAN

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 succesfully transfer files between all my machines in all permutations - Android to Linux, iMac to Android, etc.

SnapDrop

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.

sudo apt install magic-wormhole
sudo snap install wormhole
sudo brew install wormhole

etc...

Initiate file transfer by running wormhole send command, i.e:

Wormhole Send

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.:

Wormhole Receive

Transfer will commence and the file will be saved in the current folder. That’s all! Similar to SnapDrop.net, 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, i.e. /usr/local/bin/macbook:

sshfs tomasz@macbook.local:/Users/tomasz ~/macbook/tomasz

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.

Summary

I’m sure there are many other ways of coping with the problem of copying files between computers. 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 ;-)