Wormhole – Securely Share Files From One Computer to Another in Linux

It is public knowledge that if you want to get most things done quickly and securely you should use the Command Line Interface. Of course, there exist nifty apps with speedy workflows but in some cases, the CLI still rules. This is one such case.

Wormhole is a CLI-based application with which you can securely send text, files and even folders (which will be automatically zipped) to virtually anyone via the CLI.

Imagine a base case scenario: you want to send a couple of files to a friend, thousands of miles away. You launch a new terminal window using Hyper (wink), open a wormhole, and after entering a couple of words, hit enter.

Your friend on the other end launches his terminal, opens a corresponding wormhole and enters a code to authenticate his access to the files. Easy!

On Security

With regards to how secure it is to use Wormhole the GitHub page in reads:

The wormhole tool uses PAKEPassword-Authenticated Key Exchange” [that] can then be used to encrypt data. wormhole uses the SPAKE2 algorithm.

The wormhole library requires a “Rendezvous Server”: a simple WebSocket-based relay that delivers messages from one client to another. This allows the wormhole codes to omit IP addresses and port numbers. The URL of a public server is baked into the library for use as a default, and will be freely available until volume or abuse makes it infeasible to support.<

The file-transfer commands use a “Transit Relay”, which is another simple server that glues together two inbound TCP connections and transfers data on each to the other. The wormhole send file mode shares the IP addresses of each client with the other (inside the encrypted message), and both clients first attempt to connect directly. If this fails, they fall back to using the transit relay.

How to Install and Usage Wormhole in Linux

On Debian 9 and Ubuntu 17.04+, you can install Wormhole using apt command below.

$ sudo apt install magic-wormhole

On older versions of the Debian/Ubuntu, you need to install following required packages to get the latest version of Wormhole.

$ sudo apt-get install python-pip build-essential python-dev libffi-dev libssl-dev
$ pip install magic-wormhole

On Fedora distribution, you can get using following commands.

$ dnf install python-pip python-devel libffi-devel openssl-devel gcc-c++ libtool redhat-rpm-config
$ pip install magic-wormhole

Once the installation is complete you can begin sending files immediately.

To send a file use this command.

$ wormhole send PopTheme.zip

Sending 16.9 MB file named 'PopTheme.zip'
On the other computer, please run: wormhole receive
Wormhole code is: 7-examine-stopwatch

A code will be generated during the sending process and that is what you will pass on to you intended recipient.

Wormhole Send Files
Wormhole Send Files

To receive a file use this command:

$ wormhole receive 

Both the sender and receiver will get notifications on indicating the progress of the file transfer or if the process encounters any errors on the way.

I think wormhole is a nifty app; especially for those comfortable with opening their terminal every now and then (and keyboard masters).

Divine Okoi is a cybersecurity postgrad with a passion for the open-source community. With 700+ articles covering different topics in IT, you can always trust him to inform you about the coolest tech.

Each tutorial at GeeksMint is created by a team of experienced writers so that it meets our high-quality writing standards.

2 thoughts on “Wormhole – Securely Share Files From One Computer to Another in Linux”

  1. That app looks great, but basicly works like teamviewer, there is a server in the middle to process every task you want to do. And I dont feel confortable that someone else must know what I want to do, could be good to install my own server to validate every task. But thanks to share, it’s still a good idea

    • Oh, I see. But do those who can access the server have the ability to see the data you’re transferring without using the generated code?


Got Something to Say? Join the Discussion...