Secure web-based SSH client - Alpine 3.22.2, Python 3.13.8, all CVE patches applied (Oct 2025)
1.8K
A web-based SSH client with updated security patches based on WebSSH.
python:3.13-alpine3.22docker run -d -p 8888:8888 --name webssh monzal/webssh:1.6.3-secure
Access WebSSH at: http://localhost:8888
docker run -d \
-p 7773:8888 \
--name webssh \
--restart unless-stopped \
monzal/webssh:1.6.3-secure
ssh.yourdomain.com)docker run -d \
-p 127.0.0.1:7773:8888 \
--name webssh \
--restart unless-stopped \
monzal/webssh:1.6.3-secure
Note: Binding to 127.0.0.1 ensures WebSSH is only accessible via reverse proxy.
sudo a2enmod proxy proxy_http proxy_wstunnel ssl headers rewrite
sudo systemctl restart apache2
Create /etc/apache2/sites-available/webssh.conf:
<VirtualHost *:80>
ServerName ssh.yourdomain.com
ServerAdmin webmaster@localhost
# Redirect to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ErrorLog ${APACHE_LOG_DIR}/webssh_error.log
CustomLog ${APACHE_LOG_DIR}/webssh_access.log combined
</VirtualHost>
Enable the site:
sudo a2ensite webssh.conf
sudo systemctl reload apache2
sudo certbot --apache -d ssh.yourdomain.com --non-interactive --agree-tos --redirect
This creates /etc/apache2/sites-available/webssh-le-ssl.conf
Edit /etc/apache2/sites-available/webssh-le-ssl.conf:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName ssh.yourdomain.com
ServerAdmin webmaster@localhost
# Reverse Proxy to WebSSH
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:7773/
ProxyPassReverse / http://127.0.0.1:7773/
# WebSocket support for terminal
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://127.0.0.1:7773/$1" [P,L]
# Security headers
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Content-Type-Options nosniff
Header always set X-Frame-Options DENY
Header always set X-XSS-Protection "1; mode=block"
ErrorLog ${APACHE_LOG_DIR}/webssh_error.log
CustomLog ${APACHE_LOG_DIR}/webssh_access.log combined
SSLCertificateFile /etc/letsencrypt/live/ssh.yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ssh.yourdomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
sudo apache2ctl configtest
sudo systemctl reload apache2
Open your browser: https://ssh.yourdomain.com
To protect WebSSH with password authentication:
sudo htpasswd -c /etc/apache2/.htpasswd yourusername
<Location />
AuthType Basic
AuthName "SSH Access Required"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Location>
Reload Apache2:
sudo systemctl reload apache2
docker run -d \
-p 7773:8888 \
-e "POLICY=reject" \
-e "MAXCONN=20" \
-e "DELAY=3" \
--name webssh \
monzal/webssh:1.6.3-secure
Available options:
POLICY - Host key policy: warning (default), autoadd, rejectMAXCONN - Maximum connections per IP (default: 20)DELAY - Delay between connections in seconds (default: 3)Create docker-compose.yml:
version: '3.8'
services:
webssh:
image: monzal/webssh:1.6.3-secure
container_name: webssh
restart: unless-stopped
ports:
- "127.0.0.1:7773:8888"
environment:
- POLICY=reject
- MAXCONN=20
- DELAY=3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
Start with:
docker-compose up -d
git clone https://github.com/monzal/webssh
cd webssh/build
docker build -t webssh:1.6.3-secure .
Check for updates monthly:
docker pull monzal/webssh:latest
docker stop webssh
docker rm webssh
docker run -d -p 7773:8888 --name webssh --restart unless-stopped monzal/webssh:latest
docker logs webssh
systemctl status sshsudo ufw statusssh user@hostnameproxy_wstunnel module is enabled in Apache2apache2ctl configtestsudo certbot renew --dry-run
sudo certbot certificates
MIT License - Based on WebSSH
All notable changes to this project will be documented in this file.
python:3.13-alpine3.22 (ensures latest Alpine 3.22.x)rm -rf /var/cache/apk/* /root/.cache)This image should be rebuilt monthly to incorporate:
This project follows the versioning scheme:
[WebSSH Version]-[Security Status]1.6.3-secureTags:
1.6.3-secure - Specific secure buildlatest - Always points to most recent secure build1.6.3 - Original WebSSH version without security updates# Stop old container
docker stop webssh
docker rm webssh
# Pull and run updated image
docker pull monzal/webssh:1.6.3-secure
docker run -d -p 7773:8888 --name webssh --restart unless-stopped monzal/webssh:1.6.3-secure
No configuration changes required - drop-in replacement.
Content type
Image
Digest
sha256:282d78bcd…
Size
28 MB
Last updated
11 months ago
docker pull monzal/webssh