8000 GitHub - mowdep/sshtools
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mowdep/sshtools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PAPAMICA

A collection of powerful tools to enhance your SSH experience with custom configurations for bash, vim, and various utility functions.

Somes screenshots

MOTD

motd

Benchmark

benchmark

Webshare

webshare1 webshare2

Checksec

checksec

Less color

lesscolor

🌟 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 testing
  • checksec: Security audit and recommendations
  • webshare: Easy file sharing via HTTP
  • logwatch: Real-time log monitoring with color highlighting
  • extract: Universal archive extraction
  • compress: File compression with multiple formats
  • And many more...

🎨 Color-Enhanced Commands

  • Enhanced less with syntax highlighting
  • Colored tail output
  • Improved directory listings
  • Better log readability

🚀 Installation

  1. Clone this repository:
git clone https://github.com/PAPAMICA/sshtools.git ~/.sshtools
  1. Add the following function to your ~/.bashrc or ~/.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 > ~/.bashrc_remote && \
            echo '$REMOTE_VIMRC' | base64 -d | gunzip > ~/.vimrc_remote && \
            echo '$REMOTE_WEBSHARE' | base64 -d | gunzip > ~/.webshare.py && \
            bash --rcfile ~/.bashrc_remote
        "
    else
        /usr/bin/ssh "$@"
    fi
}

alias sshc="/usr/bin/ssh"
  1. Source your shell configuration:
source ~/.bashrc  # or source ~/.zshrc
  1. SSH your server:
ssh your_server

Note : Add your server to your ssh_config.

📚 Available Commands

System Information

  • motd: Display welcome message with system information
  • benchmark: Run comprehensive server performance tests
  • checksec: Perform security audit
  • logwatch: Watch system logs in real-time

File Management

  • extract: Extract any type of archive
  • compress: Compress files/directories
  • findfile: Search for files with color highlighting
  • tree: Display directory structure
  • diskspace: Analyze disk usage
  • webshare: Start a web file sharing server
  • webshare_cleanup: Clean up webshare server

Editor Commands

  • p / hp: Show/hide current path in prompt
  • vic: Vim with custom configuration

System Commands

  • start/stop/restart: Service management
  • status: Service status
  • enable/disable: Enable/disable services
  • reload: Reload service configuration
  • oomanalyser: Analyze out of memory events

Network Commands

  • ports: Show listening ports
  • myip: Show public IP
  • localip: Show local IP

Monitoring Commands

  • topcpu: Show top 10 CPU processes
  • topmem: Show top 10 memory processes
  • df: Show disk usage
  • du: Show directory usage
  • free: Show memory usage

Git Commands

  • gs: Git status
  • ga: Git add
  • gc: Git commit
  • gp: Git push
  • gl: Git pull
  • gd: Git diff

Docker Commands

  • dps: List running containers
  • dls: List all containers
  • dim: List images
  • dlog: Show container logs
  • dstop: Stop container
  • drm: Remove container
  • drmi: 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 64.2%
  • Python 35.8%
0