mirror of
https://github.com/PAPAMICA/sshtools.git
synced 2026-05-09 00:08:57 +02:00
No description
| .bashrc_remote | ||
| .vimrc_remote | ||
| .webshare.py | ||
| README.md | ||
A collection of powerful tools to enhance your SSH experience with custom configurations for bash, vim, and various utility functions.
Somes screenshots
MOTD
Benchmark
Webshare
Checksec
Less color
🌟 Features
🔧 Enhanced Shell Experience
- Custom prompt with color-coded usernames
- Comprehensive system information display (MOTD)
- Advanced command history search
- Colored output for logs and commands
- Automatic package management detection and installation
📝 Vim Configuration
- Modern dark theme optimized for readability
- Line numbers and syntax highlighting
- Enhanced status line with mode indicator
- Mouse support
- Improved key mappings for navigation
- File type specific settings
🛠️ Utility Functions
benchmark: Comprehensive system performance testingchecksec: Security audit and recommendationswebshare: Easy file sharing via HTTPlogwatch: Real-time log monitoring with color highlightingextract: Universal archive extractioncompress: File compression with multiple formats- And many more...
🎨 Color-Enhanced Commands
- Enhanced
lesswith syntax highlighting - Colored
tailoutput - Improved directory listings
- Better log readability
🚀 Installation
- Clone this repository:
git clone https://github.com/PAPAMICA/sshtools.git ~/.sshtools
- Add the following function to your
~/.bashrcor~/.zshrc:
ssh() {
if [ -f "$HOME/.sshtools/.bashrc_remote" ] && [ -f "$HOME/.sshtools/.vimrc_remote" ] && [ -f "$HOME/.sshtools/.webshare.py" ]; then
# Compress and encode files
REMOTE_BASHRC=$(gzip -c "$HOME/.sshtools/.bashrc_remote" | base64)
REMOTE_VIMRC=$(gzip -c "$HOME/.sshtools/.vimrc_remote" | base64)
REMOTE_WEBSHARE=$(gzip -c "$HOME/.sshtools/.webshare.py" | base64)
/usr/bin/ssh -t $1 "
echo '$REMOTE_BASHRC' | base64 -d | gunzip > /tmp/.bashrc_remote && \
echo '$REMOTE_VIMRC' | base64 -d | gunzip > /tmp/.vimrc_remote && \
echo '$REMOTE_WEBSHARE' | base64 -d | gunzip > /tmp/webshare.py && \
bash --rcfile /tmp/.bashrc_remote
"
else
/usr/bin/ssh "$@"
fi
}
alias sshc="/usr/bin/ssh"
- Source your shell configuration:
source ~/.bashrc # or source ~/.zshrc
- SSH your server:
ssh your_server
Note : Add your server to your ssh_config.
📚 Available Commands
System Information
motd: Display welcome message with system informationbenchmark: Run comprehensive server performance testschecksec: Perform security auditlogwatch: Watch system logs in real-time
File Management
extract: Extract any type of archivecompress: Compress files/directoriesfindfile: Search for files with color highlightingtree: Display directory structurediskspace: Analyze disk usagewebshare: Start a web file sharing serverwebshare_cleanup: Clean up webshare server
Editor Commands
p/hp: Show/hide current path in promptvic: Vim with custom configuration
System Commands
start/stop/restart: Service managementstatus: Service statusenable/disable: Enable/disable servicesreload: Reload service configurationoomanalyser: Analyze out of memory events
Network Commands
ports: Show listening portsmyip: Show public IPlocalip: Show local IP
Monitoring Commands
topcpu: Show top 10 CPU processestopmem: Show top 10 memory processesdf: Show disk usagedu: Show directory usagefree: Show memory usage
Git Commands
gs: Git statusga: Git addgc: Git commitgp: Git pushgl: Git pullgd: Git diff
Docker Commands
dps: List running containersdls: List all containersdim: List imagesdlog: Show container logsdstop: Stop containerdrm: Remove containerdrmi: Remove image
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
🙏 Acknowledgments
- Thanks to all contributors who have helped enhance these tools
- Inspired by various shell customization projects and system administration tools