LinuxCommandLibrary

croc

secure file transfer tool

TLDR

Send file

$ croc send [file]
copy
Send multiple files
$ croc send [file1] [file2] [file3]
copy
Send directory
$ croc send [directory/]
copy
Receive file
$ croc [code-phrase]
copy
Send with custom code
$ croc send --code [my-secret-code] [file]
copy
Use custom relay
$ croc --relay [relay.example.com:9009] send [file]
copy
Run relay server
$ croc relay
copy

SYNOPSIS

croc [options] send [sendoptions] file_
croc [options] code-phrase

DESCRIPTION

croc is a tool for securely transferring files between computers. It uses a relay server and PAKE (Password Authenticated Key Exchange) for end-to-end encryption, ensuring that transferred files cannot be read by the relay server or intercepted on the network.
The tool works across different networks without requiring port forwarding or firewall configuration. Users share a short code phrase, both parties connect to a relay server, and files are transferred through an encrypted channel. Local network transfers automatically use direct connections for faster speeds when possible.
Features include resumable transfers (if interrupted, transfers can continue from where they left off), support for sending multiple files and entire directories, cross-platform compatibility (Linux, macOS, Windows), and the option to run your own relay server for complete control.

PARAMETERS

--code phrase

Use custom code phrase
--relay address
Specify relay server
--yes
Accept transfer without prompt
--out path
Output directory for received files
--overwrite
Overwrite existing files
--curve type
Encryption curve (p256, p384, p521, siec)
--hash algorithm
Hash algorithm (xxhash, imohash, md5)
--no-compress
Disable compression
--no-local
Disable local network transfer
--ports range
Port range for local transfer

COMMANDS

send

Send files or folders
relay
Run a relay server

ENVIRONMENT

CROC_RELAY

Default relay server
CROC_PASS
Default code phrase

HOW IT WORKS

1. Sender generates code phrase
2. Both parties connect to relay
3. PAKE establishes encrypted channel
4. Files transfer through relay (or directly on LAN)

CAVEATS

Default relay is public (croc.schollz.com). For sensitive transfers, run your own relay. Code phrases should be shared securely.

SEE ALSO

rsync(1), scp(1), magic-wormhole(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community