Troubleshooting EzTunnelSSH: Common Issues and Fixes
Troubleshooting EzTunnelSSH: Common Issues and Fixes
1. Connection refused / cannot reach remote host
- Cause: SSH server not running, wrong host/port, firewall blocking, or network outage.
- Fixes:
- Verify remote host and port (ssh user@host -p PORT).
- Ensure SSH server is running on the remote machine (systemctl status sshd).
- Check firewall rules on client and server (ufw/iptables/nftables) and allow the SSH port.
- Test network connectivity (ping, traceroute).
2. Authentication failures (password/key rejected)
- Cause: Wrong credentials, missing/incorrect private key permissions, or key not authorized.
- Fixes:
- Confirm username and password.
- Check private key permissions (
chmod 600 /.ssh/id_rsa).
- Verify public key is in
/.ssh/authorized_keys on server and has correct permissions (chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys).
- Use
ssh -v to inspect authentication steps.
3. Port forwarding not working (local/remote/ dynamic)
- Cause: Incorrect port mapping, services not listening, or bind restrictions on server.
- Fixes:
- Confirm correct tunnel syntax (local forward:
-L local_port:dest_host:dest_port; remote: -R remote_port:dest_host:dest_port; dynamic: -D socks_port).
- Ensure destination service is listening and reachable from the SSH server.
- For remote forwards, allow GatewayPorts or adjust
sshd_config (AllowTcpForwarding yes, GatewayPorts yes) and restart sshd.
- Check for collisions with existing services using the same port.
4. Tunnel drops or disconnects frequently
- Cause: Unstable network, server-side timeouts, or keepalive not configured.
- Fixes:
- Enable keepalives: client-side (
ServerAliveInterval 60) and server-side (ClientAliveInterval/ClientAliveCountMax).
- Use autossh to automatically restart dropped tunnels.
- Investigate network stability and latency; check logs (
/var/log/auth.log or journalctl -u sshd).
5. High latency or slow performance through tunnel
- Cause: Bandwidth limits, encryption overhead, or intermediate network congestion.
- Fixes:
- Test raw latency/bandwidth (ping, iperf) to identify bottleneck.
- Use compression (
-C) if CPU permits.
- Consider lighter ciphers in
sshd_config/ssh (-c aes128-ctr) if compatible and secure.
- Offload heavy traffic outside the tunnel if possible.
6. Permission denied for binding privileged ports (<1024)
- Cause: Non-root user cannot bind low ports on remote host.
- Fixes:
- Use higher (>1024) ports for forwarding.
- If necessary and safe, run SSH as root or set CAP_NET_BIND_SERVICE on the sshd binary — weigh security implications.
7. DNS/name resolution issues over tunnel
- Cause: Client or server resolving names differently or DNS not routed through the tunnel.
- Fixes:
- Use IP addresses in forwarding rules or ensure DNS queries go through the tunnel (configure proxy/DNS settings for the application).
- For dynamic SOCKS proxies (
-D), configure the app or system to use the SOCKS proxy and enable remote DNS if supported.
8. Permission or SELinux/AppArmor blocking connections
- Cause: Host security frameworks preventing sshd from forwarding/binding.
- Fixes:
- Check audit logs (`
Leave a Reply