Do you often need to quickly retrieve output files from scripts executed over SSH?
Something like this if you have the file name in the clipboard:
Or even like this if you don’t have it:
With the following features:
- Secure file sharing over HTTPS
- Option to specify a custom port or use a random port
- Automatic IP address detection
- SSL certificate generation for secure connections
- Port availability check and handling
- Option to temporarily open closed ports (with firewall management)
- Support for multiple firewall types (ufw, firewall-cmd, iptables)
- Handling of ports already in use (with option to kill existing processes)
- File existence check before sharing
- Python 3 and ‘chardet’ module dependency checks
- Automatic installation of ‘chardet’ module if missing
- Display of download instructions for users (using curl or wget)
- Option to download the SSL certificate for secure connections
- Simple web interface showing the shared file
- Automatic encoding detection for text files
- Support for sharing both text and binary files
- Error handling for invalid options and file not found scenarios
- Interactive prompts for user input when needed
- Display of both secure (with certificate) and insecure (ignoring SSL warnings) download methods
How to install it ?
Put the code bellow in the .bashrc file for instance to get the most useful alias in the world.
The code is available here.
✓ Founder of Kelogs, a SaaS SEO Crawler & Log Analyzer
✓ Made for fun the app The Keyword
✓ International SEO Consultant (Freelance)
✓ Over 10 years of SEO experience
✓ Consultant to countless small and big businesses over the decade
Read more about me, myself and I.