A secure file transfer system written in pure Bash that leverages industry-standard encryption tools (OpenSSL & GPG) to ensure files are safely shared over insecure networks using SCP or RSYNC over SSH.
This project aims to provide a minimal, secure, and easy-to-use command-line tool to:
- Encrypt sensitive files locally before sending them.
- Transfer files securely using existing encrypted channels (SCP/RSYNC via SSH).
- Allow decryption only by authorized users (via password or public key).
- Be lightweight and run on most UNIX-based systems without dependencies on heavy software.
- Mohamed Wael
- Eslaam Ibrahim
- Malak Ali
| Technique | Tool Used | Notes |
|---|---|---|
| Symmetric Encryption | OpenSSL (AES-256-CBC) | User-provided password; fast and simple. |
| Asymmetric Encryption | GPG | Secure key-based encryption; no password sharing. |
| Transfer Layer | SCP / RSYNC | Uses SSH; encrypted and authenticated. |
All encryption happens locally, so no plain data is sent over the network. Passwords are not stored, only used in memory temporarily.
- π Upload or download mode
- π Two encryption options:
- AES-256 (OpenSSL)
- GPG (PGP standard)
- π€ Transfer via:
scp(simple & secure)rsync(efficient for large or repeated transfers)
- β Error checking at each step
- π§ Modular functions for easy customization
- π§ͺ Temporary password handling using
mktemp
- β System admins sending sensitive configuration files.
- β Developers deploying encrypted backups.
- β Students learning about secure file sharing and Bash scripting.
- β Transferring academic or medical documents securely.
Step 1: User chooses upload or download
Step 2: User selects encryption method (AES or GPG)
Step 3: Script encrypts (upload) or decrypts (download) the file
Step 4: File is transferred via SCP or RSYNC
Step 5: User is notified of success/failure
Make sure you have these tools installed:
- bash
- openssl
- gpg
- scp
- rsync
- ssh
Install using:
sudo apt install openssh-client rsync openssl gnupggit clone https://github.com/your-username/secure-file-transfer-shell.git
cd secure-file-transfer-shellchmod +x SFTP.sh./SFTP.shFollow the menu instructions interactively.
./SFTP.shFollow prompts:
- Choose option 1 (Upload)
- Choose AES encryption
- Enter file name
- Choose transfer method
- Enter destination (e.g. user@host:/path)
To use asymmetric encryption with GPG, follow these steps:
gpg --full-generate-keygpg --armor --export you@example.comgpg --import recipient-key.ascFeel free to fork this repo, suggest features, or submit pull requests!