Linux command
rage 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Encrypt file with passphrase
rage -p -o [encrypted.age] [file.txt]
Encrypt with recipient
rage -r [age1...] -o [encrypted.age] [file.txt]
Decrypt file
rage -d -i [key.txt] [encrypted.age]
Generate new key
rage-keygen -o [key.txt]
Encrypt with SSH key
rage -R [~/.ssh/id_ed25519.pub] [file.txt]
Armor output
rage -a -r [age1...] [file.txt]
Encrypt to multiple recipients
rage -r [age1...] -r [age1...] -o [encrypted.age] [file.txt]
Decrypt with passphrase
rage -d -p [encrypted.age]
Encrypt stdin
echo "secret" | rage -r [age1...] -o [secret.age]
说明
rage is a Rust implementation of the age encryption tool. It provides simple, modern file encryption. Public key encryption uses age keys or SSH keys. Recipients are specified by their public key. Passphrase mode uses scrypt for key derivation. No key management needed for simple use. ASCII armor produces text output. Safe for email or other text channels. Multiple recipients allow group encryption. Any recipient can decrypt.
参数
- -e, --encrypt
- Encrypt mode.
- -d, --decrypt
- Decrypt mode.
- -r, --recipient _KEY_
- Recipient public key.
- -R, --recipients-file _FILE_
- File with recipients.
- -i, --identity _FILE_
- Identity/private key.
- -p, --passphrase
- Use passphrase.
- -a, --armor
- ASCII armor output.
- -o, --output _FILE_
- Output file. If omitted, writes to stdout.
- -j _PLUGINS_
- Use the given age plugin.
FAQ
What is the rage command used for?
rage is a Rust implementation of the age encryption tool. It provides simple, modern file encryption. Public key encryption uses age keys or SSH keys. Recipients are specified by their public key. Passphrase mode uses scrypt for key derivation. No key management needed for simple use. ASCII armor produces text output. Safe for email or other text channels. Multiple recipients allow group encryption. Any recipient can decrypt.
How do I run a basic rage example?
Run `rage -p -o [encrypted.age] [file.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -e, --encrypt do in rage?
Encrypt mode.