SSHVaultX VPN - Fast and Secure SSH over VPN - Advanced Python implementation with proper SOCKS5 proxy support
A powerful and lightweight SSH-based VPN solution that creates secure tunnels through SSH servers and routes all your network traffic using SOCKS5 proxy protocol. Perfect for bypassing network restrictions, accessing remote resources securely, and protecting your privacy with encrypted connections.
- SOCKS5 Proxy Support: Full SOCKS5 implementation for seamless proxy tunneling
- Cross-Platform: Works on Windows, macOS, and Linux
- Multiple Authentication Methods: Password and SSH key authentication
- Windows Integration: Automatic proxy configuration for Windows systems
- Interactive Mode: User-friendly command-line interface
- Retry Logic: Automatic connection retry with configurable timeouts
- Secure: Uses Paramiko for robust SSH connections
SSHVaultX creates a secure tunnel through SSH and routes all your network traffic through it using SOCKS5 proxy protocol. Here's how it works:
[Your Computer] ββ [SOCKS5 Proxy:127.0.0.1:9000] ββ [SSH Tunnel] ββ [Remote Server] ββ [Internet]
- SSH Client: Establishes secure connection to remote server using Paramiko
- SOCKS5 Server: Creates local proxy server on your machine
- Tunnel Manager: Manages data forwarding between proxy and SSH connection
- Windows Integration: Automatically configures system proxy settings
- Connects to remote SSH server using provided credentials
- Supports both password and SSH key authentication
- Implements retry logic with configurable timeouts
- Uses Paramiko library for robust SSH handling
- Creates local SOCKS5 proxy server on
127.0.0.1:9000(configurable) - Handles SOCKS5 protocol handshake and authentication
- Supports both IPv4 and domain name resolution
- Manages multiple concurrent connections
- Establishes direct TCP channels through SSH connection
- Forwards data bidirectionally between local proxy and remote server
- Uses threading for concurrent connection handling
- Implements proper error handling and connection cleanup
- Automatically configures Windows Internet Settings registry
- Sets system-wide proxy to SOCKS5 server
- Provides seamless integration without manual configuration
- Restores original settings on disconnect
- Encrypted Tunnel: All traffic is encrypted through SSH
- No Data Logging: No user data is stored or logged
- Secure Authentication: Supports SSH keys and strong passwords
- Connection Validation: Verifies SSH server before establishing tunnel
- Graceful Shutdown: Properly cleans up connections and settings
- Python 3.7 or higher
- SSH server access (with password or key authentication)
| Operating System | Version | Status | Notes |
|---|---|---|---|
| Windows | Windows 10/11 | β Fully Supported | Automatic proxy configuration |
| Windows | Windows 8.1 | β Supported | Manual proxy configuration |
| Windows | Windows 7 | Manual proxy configuration | |
| macOS | 10.14+ | β Fully Supported | Manual proxy configuration |
| macOS | 10.12-10.13 | β Supported | Manual proxy configuration |
| Linux | Ubuntu 18.04+ | β Fully Supported | Manual proxy configuration |
| Linux | Debian 9+ | β Fully Supported | Manual proxy configuration |
| Linux | CentOS 7+ | β Fully Supported | Manual proxy configuration |
| Linux | RHEL 7+ | β Fully Supported | Manual proxy configuration |
| Linux | Fedora 30+ | β Fully Supported | Manual proxy configuration |
| Linux | Arch Linux | β Fully Supported | Manual proxy configuration |
| Linux | openSUSE 15+ | β Fully Supported | Manual proxy configuration |
- Automatic Proxy Configuration: Automatically sets system-wide proxy settings
- Registry Integration: Modifies Windows Internet Settings registry
β οΈ Administrator Privileges Required: Must run as Administrator for proxy configuration- Windows Defender: Compatible with Windows Defender and other antivirus software
- Manual Configuration: Requires manual proxy setup in System Preferences
- Terminal Integration: Works seamlessly with Terminal and iTerm2
- Homebrew Support: Can be installed via Homebrew
- Gatekeeper: Compatible with macOS Gatekeeper security features
- Manual Configuration: Requires manual proxy setup in applications
- Package Managers: Available as .deb and .rpm packages
- Systemd Integration: Can be run as a systemd service
- Firewall Compatibility: Works with iptables, ufw, and firewalld
# β οΈ IMPORTANT: Run Command Prompt or PowerShell as Administrator
# Right-click on Command Prompt/PowerShell and select "Run as administrator"
# Direct Python installation
python main.py --ip server.com --user admin --key ~/.ssh/id_rsa
# Or install from source
git clone https://github.com/alicangnll/sshvaultx.git
cd sshvaultx
pip install -r requirements.txt
# Note: Administrator privileges are required for automatic proxy configuration# Using Homebrew (recommended)
brew install python3
pip3 install paramiko
python3 main.py --ip server.com --user admin --key ~/.ssh/id_rsa
# Or install from source
git clone https://github.com/alicangnll/sshvaultx.git
cd sshvaultx
pip3 install -r requirements.txt# Install dependencies
sudo apt-get update
sudo apt-get install python3 python3-pip
# Install from source
git clone https://github.com/alicangnll/sshvaultx.git
cd sshvaultx
pip3 install -r requirements.txt
# Or install .deb package
sudo dpkg -i sshvaultx_1.0.0_all.deb# Install dependencies
sudo yum install python3 python3-pip # CentOS/RHEL
# or
sudo dnf install python3 python3-pip # Fedora
# Install from source
git clone https://github.com/alicangnll/sshvaultx.git
cd sshvaultx
pip3 install -r requirements.txt
# Or install .rpm package
sudo rpm -i sshvaultx-1.0.0-1.noarch.rpm- Windows XP/Vista: Not supported (Python 3.7+ required)
- macOS 10.11 and earlier: Not supported (Python 3.7+ required)
- 32-bit systems: Limited testing, may work but not officially supported
- ARM processors: Limited testing on ARM-based systems (Apple Silicon, ARM64 Linux)
Download pre-built packages for your operating system:
| Platform | Package | Download | Installation |
|---|---|---|---|
| Debian/Ubuntu | .deb |
Download | sudo dpkg -i sshvaultx_*.deb |
| Red Hat/CentOS/Fedora | .rpm |
Download | sudo rpm -i sshvaultx-*.rpm |
| macOS (Homebrew) | .deb |
Download | sudo dpkg -i sshvaultx_*_macos.deb |
# Download latest release
wget https://github.com/alicangnll/sshvaultx/releases/latest/download/sshvaultx_1.0.0_[OS]_all.deb
# Install (replace [OS] with your platform)
sudo dpkg -i sshvaultx_1.0.0_[OS]_all.deb
# Verify installation
sshvaultx --help-
Clone the repository:
git clone https://github.com/alicangnll/sshvaultx.git cd sshvaultx -
Install dependencies:
pip install -r requirements.txt
python main.py --ip 192.168.1.100 --port 22 --user root --password mypasspython main.py --ip 192.168.1.100 --user root --key ~/.ssh/id_rsapython main.py --ip 10.0.0.1 --port 22 --user vpn --interactive| Option | Description | Default |
|---|---|---|
--ip, --host |
SSH server IP address or hostname | Required |
--port, -p |
SSH server port | 22 |
--user, -u, --username |
SSH username | Required |
--password, -w |
SSH password | Optional |
--key, -k, --keyfile |
SSH private key file path | Optional |
--key-passphrase |
SSH private key passphrase | Optional |
--interactive, -i |
Interactive mode | False |
--proxy-port |
Local SOCKS5 proxy port | 9000 |
--timeout, -t |
SSH connection timeout (seconds) | 10 |
--quiet, -q |
Quiet mode (minimal output) | False |
Basic connection with password:
python main.py --ip server.com --user admin --password mypasswordSSH key with passphrase:
python main.py --ip server.com --user admin --key ~/.ssh/id_rsa --key-passphrase mypassphraseCustom port and proxy:
python main.py --ip server.com --port 2222 --user admin --key ~/.ssh/id_rsa --proxy-port 8080Quiet mode:
python main.py --ip server.com --user admin --key ~/.ssh/id_rsa --quietSSHVaultX automatically configures Windows proxy settings when connected. The proxy will be set to socks5://127.0.0.1:9000 (or your specified port).
Configure your applications to use the SOCKS5 proxy at 127.0.0.1:9000 (or your specified port).
- Version 5: Full SOCKS5 protocol implementation
- Authentication: No authentication method (method 0x00)
- Address Types: IPv4 (0x01) and Domain Name (0x03)
- Commands: CONNECT (0x01) for TCP connections
- Error Handling: Proper SOCKS5 error codes and responses
- Direct TCP: Uses SSH direct-tcpip channel type
- Bidirectional: Full-duplex data forwarding
- Threading: Separate threads for each direction
- Buffer Management: 4KB buffer size for optimal performance
- Concurrent Connections: Supports multiple simultaneous connections
- Memory Usage: Minimal memory footprint (~10-20MB)
- CPU Usage: Low CPU usage during normal operation
- Latency: Adds minimal latency (typically <10ms)
- Keep-Alive: SSH connection keep-alive for stability
- Timeout Handling: Configurable timeouts for all operations
- Retry Logic: Automatic reconnection on failures
- Graceful Degradation: Proper cleanup on errors
# Registry keys modified:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
- ProxyEnable: DWORD (0 or 1)
- ProxyServer: REG_SZ (socks5://127.0.0.1:port)- Signal Handling: Proper SIGINT/SIGTERM handling
- Cleanup: Automatic resource cleanup on exit
- Error Recovery: Graceful error handling and recovery
- Password Security: Avoid using
--passwordin command line for security reasons. Use interactive mode instead. - Key Files: Ensure your SSH private keys have appropriate permissions (600).
- Server Trust: The application uses
AutoAddPolicy()for host keys. Consider implementing proper host key verification for production use.
Common Penetration Testing Scenarios:
- Network Pivoting: Use compromised servers to access internal networks
- Bypass Network Segmentation: Access restricted resources through accessible servers
- Lateral Movement: Move through internal networks using compromised credentials
- Privilege Escalation: Access higher-privileged systems through lower-privileged servers
Best Practices for Security Testing:
- Always obtain proper authorization before testing
- Document all activities and findings
- Use strong authentication methods (SSH keys preferred)
- Clean up after testing (disconnect properly)
- Follow responsible disclosure practices
# Connect through a server in a different country
python main.py --ip your-server.com --user vpn --key ~/.ssh/id_rsa
# All your traffic will now appear to come from your-server.com# Access internal company resources securely
python main.py --ip company-server.internal --user employee --password
# Browse internal websites as if you're on the company network# Test applications from different IP addresses
python main.py --ip test-server.com --user developer --interactive
# Your applications will see the test-server.com IP# Route all traffic through encrypted tunnel
python main.py --ip privacy-server.com --user anonymous --key ~/.ssh/id_rsa --quiet
# Your ISP can only see encrypted SSH traffic# Scenario: You have SSH credentials but no direct access to target systems
# Use SSHVaultX to pivot through accessible servers to reach internal networks
# Step 1: Connect through accessible server
python main.py --ip accessible-server.internal --user pentester --password found_password
# Step 2: Now all your traffic appears to come from accessible-server.internal
# You can now:
# - Scan internal networks from the server's perspective
# - Access internal services that only allow connections from internal IPs
# - Bypass network segmentation and access restricted resources
# - Perform lateral movement within the internal network
# Example: Access internal web application
curl --socks5 127.0.0.1:9000 http://internal-app.corp.local/admin- Chrome/Edge: Settings β Advanced β System β Open proxy settings
- Firefox: Settings β Network Settings β Manual proxy configuration
- Safari: System Preferences β Network β Advanced β Proxies
# Using curl through proxy
curl --socks5 127.0.0.1:9000 https://httpbin.org/ip
# Using wget through proxy
wget -e http_proxy=socks5://127.0.0.1:9000 https://httpbin.org/ip
# Using git through proxy
git config --global http.proxy socks5://127.0.0.1:9000# Node.js applications
export HTTP_PROXY=socks5://127.0.0.1:9000
export HTTPS_PROXY=socks5://127.0.0.1:9000
# Python applications
export http_proxy=socks5://127.0.0.1:9000
export https_proxy=socks5://127.0.0.1:9000- Verify SSH server credentials and accessibility
- Check firewall settings on both client and server
- Ensure the SSH server supports direct TCP connections
- Test SSH connection manually:
ssh [email protected]
- Verify the proxy port is not in use by another application
- Check if your application supports SOCKS5 proxies
- Windows Users: Ensure you have administrator privileges for proxy configuration
- Right-click Command Prompt/PowerShell β "Run as administrator"
- If proxy settings don't apply, restart the application with admin rights
- Test proxy connection:
curl --socks5 127.0.0.1:9000 https://httpbin.org/ip
- Verify SSH key file path and permissions
- Check if the key file is encrypted and requires a passphrase
- Ensure the SSH server accepts your authentication method
- Test SSH key:
ssh -i ~/.ssh/id_rsa [email protected]
- Check network latency to SSH server
- Verify SSH server has sufficient resources
- Consider using a server closer to your location
- Monitor CPU and memory usage during operation
IMPORTANT LEGAL NOTICE
This software is provided for educational, legitimate, and authorized security testing purposes only. Users are responsible for:
- Compliance with Laws: Ensure all usage complies with local, national, and international laws
- Authorization: Only use this tool on systems you own or have explicit written permission to access
- Security Testing: For penetration testing, obtain proper authorization and follow responsible disclosure practices
- Security: Use strong authentication methods and keep credentials secure
- Privacy: Be aware that network traffic may be monitored by network administrators
- Terms of Service: Respect the terms of service of any networks or services you access
- Documentation: Maintain proper documentation of all testing activities and findings
Prohibited Uses:
- Unauthorized access to systems or networks
- Malicious activities or cyber attacks
- Violation of any applicable laws or regulations
- Any activity that could cause harm or damage
The authors and contributors are not responsible for any misuse of this software. Use at your own risk and in accordance with applicable laws.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you encounter any issues or have questions, please open an issue on GitHub.
What's New:
- π Initial release of SSHVaultX VPN
- π Full SOCKS5 proxy implementation
- π₯οΈ Cross-platform support (Windows, macOS, Linux)
- π Multiple authentication methods (Password & SSH Key)
- πͺ Windows automatic proxy configuration
- πΊ Homebrew integration for macOS
- π¦ Pre-built packages for all major platforms
- π Comprehensive documentation and Wiki
Download:
Package Sizes:
- Debian/Ubuntu: ~15KB
- Red Hat/CentOS/Fedora: ~12KB
- macOS (Homebrew): ~16KB
| Version | Date | Highlights |
|---|---|---|
| v1.0.0 | 2024-10-18 | Initial release with full feature set |
- GitHub Repository: github.com/alicangnll/sshvaultx
- Releases: Latest Downloads
- Wiki: Documentation
- Issues: Bug Reports & Feature Requests
- Author: @alicangnll
Made with β€οΈ by @alicangnll