Troubleshooting¶
This guide helps you diagnose and resolve common issues with SSH Tunnel Manager.
SSH Connection Issues¶
Tunnel Cannot Establish Connection¶
Symptom: Tunnel fails to start or immediately disconnects.
Possible causes and solutions:
- SSH key permissions are incorrect
Ensure the .ssh directory and its contents have appropriate permissions:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_*
chmod 644 ~/.ssh/*.pub
chmod 644 ~/.ssh/config
chmod 644 ~/.ssh/known_hosts
- SSH config file is missing or incorrect
Check if ~/.ssh/config file exists and is correctly configured:
Refer to SSH Configuration Guide for proper configuration.
- Remote host is unreachable
Test SSH connection:
- Firewall blocking connection
Check local and remote firewall settings to ensure SSH connections are allowed.
Permission Denied¶
Symptom: SSH connection prompts permission denied.
Solutions:
-
Confirm using the correct SSH key:
-
Check the remote server's
authorized_keysfile: -
Ensure public key is added to remote server:
Docker Issues¶
Container Won't Start¶
Symptom: docker compose up fails.
Solutions:
-
Check Docker service status:
-
Check port conflicts:
-
View container logs:
Docker Permission Issues¶
Symptom: Permission denied when running Docker commands.
Solutions:
-
Add user to docker group:
-
Re-login or run:
File Permission Issues¶
Symptom: Container cannot access mounted files.
Solutions:
-
Check PUID and PGID settings:
-
Set correct values in
compose.yaml: -
Restart containers:
Configuration Issues¶
Configuration File Format Error¶
Symptom: Tunnel cannot start, logs show YAML parsing error.
Solutions:
-
Validate YAML syntax:
-
Check common errors:
- Indentation must use spaces, not tabs
- Ensure there's a space after colons
-
String values with special characters need quotes
-
Reference sample configuration:
Configuration Changes Not Taking Effect¶
Symptom: Tunnel not updated after modifying configuration.
Solutions:
-
Check if config file monitoring is working:
-
Manually restart service:
-
Verify config file path:
Interactive Authentication Issues¶
Interactive Tunnel Won't Start¶
Symptom: Running autossh-cli auth <hash> fails or shows errors, or the in-browser terminal modal fails to connect.
Solutions:
- Ensure using correct user context (CLI):
The auth command must be run as myuser user:
Without -u myuser, you may see permission errors accessing SSH config files.
- Verify tunnel is marked as interactive:
Check if the tunnel has interactive: true in config:
- Check SSH host configuration:
Ensure the remote host is properly configured in ~/.ssh/config:
- WebSocket connection fails (in-browser terminal):
If the xterm.js terminal modal shows "Failed to connect to authentication server":
- Verify
WS_BASE_URLis set correctly on the web container: - Verify the ws-server is running in the autossh container:
- Check that
WS_PORT(default8022) is accessible from the web container. When autossh usesnetwork_mode: "host", usews://localhost:8022.
Authentication Fails¶
Symptom: 2FA code or password is rejected.
Solutions:
- Verify credentials:
- Ensure you're entering the correct 2FA code or password
-
Check if the 2FA token has expired (TOTP codes are time-sensitive)
-
Check SSH server configuration:
- Verify the remote server supports keyboard-interactive authentication
-
Check if your account is locked or disabled on the remote server
-
Test manual SSH connection:
Interactive Tunnel Shows STOPPED After Authentication¶
Symptom: Tunnel authenticates successfully but immediately shows as STOPPED.
Solutions:
-
Check tunnel logs:
-
Verify port availability:
Ensure the local/remote port is not already in use:
- Check SSH control socket:
Tunnel Runtime Issues¶
Tunnel Frequently Disconnects and Reconnects¶
Symptom: Tunnel is unstable, frequently disconnects.
Solutions:
-
Check network connection stability
-
Adjust autossh parameters:
-
Check remote server load and network conditions
Port Already in Use¶
Symptom: Tunnel fails to start, prompts port is in use.
Solutions:
-
Find process using the port:
-
Stop the process using the port or change tunnel configuration to use a different port
Cannot Access Tunnel Service¶
Symptom: Tunnel shows running but cannot access service.
Solutions:
- Check tunnel direction:
local_to_remote: Access on remote server-
remote_to_local: Access on local machine -
Verify port binding:
-
Check firewall rules:
-
Test connection:
Web Panel Issues¶
Cannot Access Web Panel¶
Symptom: Browser cannot open http://localhost:5000.
Solutions:
-
Check Web container status:
-
View Web container logs:
-
Verify port mapping:
-
Check API connection:
Web Panel Shows Blank or Error¶
Symptom: Web panel loads but displays abnormally.
Solutions:
-
Clear browser cache
-
Check browser console for errors (F12)
-
Verify API server is running:
Terminal Modal Does Not Open¶
Symptom: Clicking Start/Restart on an interactive tunnel does not open the terminal modal.
Solutions:
-
Verify
WS_BASE_URLis configured on the web container: -
Check that the web panel reports WebSocket as enabled:
-
Verify the tunnel has
interactive: trueset in its configuration.
Terminal Modal Opens But Shows Connection Error¶
Symptom: The xterm.js terminal modal opens but displays an error message.
Solutions:
-
Check that the ws-server is running:
-
Verify the ws-server port is accessible:
-
Ensure
WS_BASE_URLuses the correct protocol (ws://nothttp://) and port.
API Issues¶
API Request Fails¶
Symptom: CLI commands or HTTP API requests return errors.
Solutions:
-
Confirm API is enabled:
-
Check API server logs:
-
Test API connection:
Logs and Debugging¶
Viewing Logs¶
# View all container logs
docker compose logs
# View specific container logs
docker compose logs autossh
docker compose logs web
# Follow logs in real-time
docker compose logs -f
# View last 100 lines of logs
docker compose logs --tail=100
Entering Container for Debugging¶
# Enter autossh container
docker compose exec autossh sh
# Enter web container
docker compose exec web sh
# Check processes inside container
ps aux
# Check network connections
netstat -tuln
Enable Verbose Logging¶
Add debug environment variables in compose.yaml:
Performance Issues¶
Container Using Too Many Resources¶
Solutions:
-
Check resource usage:
-
Limit container resources:
-
Clean up unused Docker resources:
Getting Help¶
If the above methods cannot solve your problem:
- Check project documentation:
- Getting Started
- Architecture
-
Submit an Issue: Visit GitHub Issues to submit a problem
-
Provide information:
- Operating system and version
- Docker and Docker Compose versions
- Complete error logs
- Configuration file contents (hide sensitive information)
- Steps to reproduce the problem