crocodile It is a free and open source command line tool for secure file transfer between computers. It uses relay-assisted peer-to-peer transactions and password-verified key exchange for end-to-end encryption. The program is written in Go language and can be used for Microsoft Windows, macOS, Linux and *BSD.
The idea behind croc is to be able to safely, quickly and easily transfer files and folders between cross-platform computers. Supports recoverable peer-to-peer transmission. As an additional feature, croc can also transmit short texts or URLs directly and securely.
Data transmission is done through the use of raw TCP sockets or websocket relays. When the sender and receiver are on the same LAN, croc uses local relay, otherwise it uses public relay. Therefore, croc can send files between computers on the same LAN or the Internet without enabling port forwarding.
Data usage via relay ParkerThe generated session key. To do this, croc uses code phrases, which are combinations of three random words. By default, a passphrase can only be used once between two parties, so an attacker will have less than one in 4 billion chances of guessing the passphrase correctly to steal data.
- Allow any two computers to transmit data (using relay)
- Provide end-to-end encryption (using PAKE)
- Realize easy cross-platform file and folder transfer (Windows, Linux, Mac and *BSD)
- Allow multiple file transfers
- Allows to resume the interrupted transmission
- No need for local server or port forwarding
- IPv6 priority with IPv4 backup function
- You can use a proxy, such as Tor
The developers mentioned that croc is the only command line file transfer tool with all the above features.
croc also supports starting your own relay (
croc relay; You can easily Use Docker self-hosted relay), set a custom (not generated by croc) code phrase (
croc send --code), automatically agree to all prompts (
--yes), there are many other options, such as forcing the use of local connections (
--local), specify the relay address (
--relay6), using Socks 5 proxy (
--socks5)Wait.you can use it
croc --help, and also
croc send --help For more information.
You might also like: qrcp: Scan QR code to transfer files between desktop and mobile devices via Wi-Fi
Worried that this is a command line tool and it is difficult for experienced users to use it on Microsoft Windows? It’s not. Windows users only need to download the Windows binary file, unzip it, and double-click
croc.exe Executable file, and then a console window will pop up, asking the user to enter the receiving code:
Another tool with functions similar to croc is Magic wormhole. This is a Python3 command line tool for sending files and folders between computers. The difference is that Magic Wormhole is written in Python, so its dependencies need to be installed (croc is written in Go, so you can use binary files without having to install any dependencies), while Magic Wormhole does not support multiple file transfers, file recovery , IPv6, local transmission without public relay, folder can be sent without compression, and it is not so easy to install it on Windows.
Using croc to send files or folders is very simple:
croc send file-or-folder
$ croc croc_8.6.8_Linux-64bit.debDid you mean to send 'croc_8.6.8_Linux-64bit.deb'? (y/n) ySending 'croc_8.6.8_Linux-64bit.deb' (2.1 MB)Code is: life-brother-chicken
On the other computer runcroc life-brother-chicken
As you can see from the command output, when the file is sent, croc displays the code in easy-to-remember phrases. The instructions for receiving the file are also shown here-therefore, to get the file, the recipient needs to run the croc command followed by the file/folder code:
$ croc life-brother-chicken
Accept 'croc_8.6.8_Linux-64bit.deb' (2.1 MB)? (y/n) yReceiving (<-192.168.70.106:36472)croc_8.6.8_Linux-64bit.deb 100% || (2.1/2.1 MB, 2.153 MB/s)
After the receiver runs the croc command to get the file, the sender will see a message with the following content:
After the file transfer is complete, the croc exists, so the file can no longer be downloaded.If you want to cancel the file transfer before the file transfer is complete (or even before it starts), press
Ctrl + c.
You can also use croc to safely send short texts or URLs between computers using the following command:
croc send --text "Some text"
For more information, such as using pipes, see its usage of croc. GitHub repository.
Related: ffsend: Secure file sharing from the command line (Firefox send client)
There are croc binaries for Microsoft Windows, macOS, FreeBSD and Linux.
On Linux, you can only find DEB binaries (for Debian/Ubuntu/Linux Mint/Pop!_OS/etc.), and universal binaries that can be installed on any Linux distribution, just copy it into the PATH A certain position of (e.g.
See alligator official Installation Notes For a complete list of how to install this command line tool (a universal script to install it on any Linux distribution, the tool is available in the Arch Linux repository and can be installed using Homebrew, Chocolatey, etc.).
You might also like: How to use Rclone to encrypt cloud storage files