Secure One‑Click File Transfer Between PCs Using Croc
This guide explains how to quickly and securely move files between two computers with the Go‑based Croc tool, covering its key features, command‑line usage, custom relay server setup, and practical examples for cross‑platform transfers.
Tool Features and Advantages
Relay‑based transfer works between any two computers
End‑to‑end encryption using PAKE
Cross‑platform support for Windows, Linux, and macOS
Multiple files or entire directories can be sent in one command
Supports resumable transfers
No need to set up your own server or use port‑forwarding
Prefers IPv6, falls back to IPv4
Can operate through a SOCKS5 proxy
Croc project URL: https://github.com/schollz/croc
Usage
To send a file, run the following command on the sending computer: $ croc send file.txt The tool generates a secret code that the receiver must use:
$ croc send ~/Downloads/data.csv
Sending 'data.csv' (632.9 kB)
Code is: cabinet-rodeo-mayday
On the other computer run
croc cabinet-rodeo-maydayOn the receiving computer, execute the displayed command:
$ croc cabinet-rodeo-mayday
Accept 'data.csv' (632.9 kB)? (y/n) y
Receiving (<-111.243.108.9:51032)You can also specify a custom secret code:
$ croc send --code appleboy ~/Downloads/data.csvRunning Your Own Relay Server
Croc uses a default relay server (croc.schollz.com). To deploy a private relay, run:
$ croc relay
[info] 2021/02/16 11:38:59 starting croc relay version v8.6.7-05640cd
[info] 2021/02/16 11:38:59 starting TCP server on 9010
[info] 2021/02/16 11:38:59 starting TCP server on 9012
[info] 2021/02/16 11:38:59 starting TCP server on 9009
[info] 2021/02/16 11:38:59 starting TCP server on 9013
[info] 2021/02/16 11:38:59 starting TCP server on 9011You can bind the relay to a specific port:
$ croc relay --ports 3001
[info] 2021/02/16 11:39:22 starting croc relay version v8.6.7-05640cd
[info] 2021/02/16 11:39:22 starting TCP server on 3001When sending files through your own relay, add the --relay flag to the command:
$ croc --relay 127.0.0.1:3001 send ~/Downloads/data.csv
Sending 'data.csv' (632.9 kB)
Code is: saddle-origin-horizon
On the other computer run
croc --relay 127.0.0.1:3001 saddle-origin-horizonConclusion
The Croc tool emphasizes simplicity, security, and speed, making point‑to‑point file transfers easy across Windows, macOS, and Linux. With a single CLI command and optional self‑hosted relay, users can share files quickly without complex setup.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
