Peer-to-peer file sharing
Swap Meet
For the occasional local file transfer, a few simple tools can do the job quickly and efficiently.
For smooth file transfer between computers, companies typically use file servers or locally installed cloud instances. But server-based systems require a capable hardware infrastructure; they need to be managed by an administrator and can pose vulnerabilities if configured incorrectly. If you only need to exchange a few files between individual workstations from time to time, these solutions are usually oversized.
It is far easier and faster to send and receive data using applications installed locally on workstations that work on a peer-to-peer basis. You don't need a server, and the data only travels back and forth between the participating computers without being stored on a third system.
Requirements
When choosing a tool to transfer data directly between two computers, there are a few things you need to consider. Most importantly, the tool needs to secure the data with end-to-end encryption so that third parties cannot sniff the data.
Simple file transfer does not require complex graphical user interfaces (GUIs). All that is needed is a command-line application with a manageable command set that can be used without extensive configuration and lengthy training.
If file synchronization is important, some peer-to-peer solutions for data transfer can additionally keep files and folders permanently synchronized between the participating computers.
Finally, for administrators of heterogeneous IT infrastructures, cross-platform availability is also an important decision-making criterion. The tool needs to support the popular client operating systems, preferably with standardized operation across platforms.
In this article, I will cover a few peer-to-peer tools for file sharing on local networks. (See the "Not Considered" box for tools that didn't make the cut.)
Not Considered
In addition to the candidates discussed here, there are a variety of other programs for direct data transfer between two computers, including both native Linux applications and Java programs. However, I only looked at applications that are under active development and maintenance for this article. Dukto [7], D-LAN [8], BaShare [9], p300 [10], and Transfer on LAN [11] didn't meet this requirement since their development stopped between 2009 and 2015. In some cases, it was impossible to install the packages on recent distributions due to outdated dependencies.
croc
The free croc
[1] command-line tool transfers one or more files between two computers without an intermediate instance, using a transparently set up relay on the LAN. Written in Go, the cross-platform application is available for countless variants of Linux, even for 32-bit hardware. In addition, croc
can be used on ARM systems and on various BSD derivatives. Data exchange between all supported platforms is problem-free. Besides corresponding packages, the source code is available for download on croc
's GitHub page.
Using croc
croc
's end-to-end encryption follows the Password Authenticated Key Exchange (PAKE) standard [2], which uses a freely definable secure password to generate a key for file transfer on both computers involved. croc
is the only tool in the test that can resume interrupted data transfers at a later time.
In the simplest case, the sender starts the transfer by entering
croc send FILE
It is important to specify the full path in each case, unless you are in the corresponding file directory.
The software then generates a code that the recipient needs to receive the data. The recipient then enters the code at the prompt by typing:
croc CODE
The program will then prompt the user to confirm the file to be sent. If confirmed, the transfer starts. croc
visualizes this on both systems with a progress bar (Figure 1). It also shows the recipient's IP address and the port used. After completing the transfer process, the transferred file sits in the recipient's home directory.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.