A collection of powerful tools to enhance your SSH experience with custom configurations for bash, vim, and various utility functions.
- 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
- 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
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...
- Enhanced
lesswith syntax highlighting - Colored
tailoutput - Improved directory listings
- Better log readability
- 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_serverNote : Add your server to your ssh_config.
motd: Display welcome message with system informationbenchmark: Run comprehensive server performance testschecksec: Perform security auditlogwatch: Watch system logs in real-time
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
p/hp: Show/hide current path in promptvic: Vim with custom configuration
start/stop/restart: Service managementstatus: Service statusenable/disable: Enable/disable servicesreload: Reload service configurationoomanalyser: Analyze out of memory events
ports: Show listening portsmyip: Show public IPlocalip: Show local IP
topcpu: Show top 10 CPU processestopmem: Show top 10 memory processesdf: Show disk usagedu: Show directory usagefree: Show memory usage
gs: Git statusga: Git addgc: Git commitgp: Git pushgl: Git pullgd: Git diff
dps: List running containersdls: List all containersdim: List imagesdlog: Show container logsdstop: Stop containerdrm: Remove containerdrmi: Remove image
Contributions are welcome! Please feel free to submit a Pull Request.
- Thanks to all contributors who have helped enhance these tools
- Inspired by various shell customization projects and system administration tools