Linux Apps

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

Wormhole Securely Share Files in Linux
Written by Martins D. Okoi

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

RedHat RHCSA and RHCE Certification Exam Study Ebook

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.

  Bucklespring - Activate Buckling Spring Keyboard Sounds on Your PC

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

Join Our Community Of 250,000+ Linux Lovers by liking us on Facebook, or follow us on Twitter, Google+ and Instagram.

If you liked this article, sign up for the fossmint newsletter for handpicked selection of stories from FossMint delivered to your inbox every day.


Top Deals

About the author

Martins D. Okoi

Martins Jr. (Dillivine) Okoi is a graduate of Computer Science with a passion for Linux and the Open Source community. He works as a Web designer & developer, technical writer, and programmer.

  • Saul Uribe

    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?

      • Disqustinator

        Potentially someone could intercept the receive code.

        • Even with the PAKE2 algorithm? that will be interesting to see

          • Disqustinator

            Unless information is being passed on physical paper, then anything appearing on he display of a computing device is interceptable, with the right tools in place.

          • “… anything appearing on he display of a computing device is interceptable, with the right tools in place.” True; in theory.

          • Disqustinator

            Easily achieved with the right social engineering techniques.

      • Saul Uribe

        Maybe not, but I can be done, I mean, I understand that it works with a encrypted algorithm, but soon or later some will fine a bug, and… well you know what I mean.

        I’m not saying that it’nt a good idea, but could be great to have your own middle server to make this taks. Or maybe it can be able to install many server on internet and let you select your favorite server to transfer.

        Great post anyway, and thanks to share with everybody.

        • I understand you.
          As for me I’m okay with the native security it provides. Maybe that’s because I seldom send particularly sensitive stuff over the internet.

          Thanks for reading, Saul. It’s always a pleasure to share.

Show Buttons
Hide Buttons