SSH Connection Troubleshooting
Connection Refused
Symptom: "Connection refused" when connecting to a remote server.
Check:
- SSH server is running:
systemctl status sshdon the remote - Port is correct (default 22, some providers use custom ports)
- Firewall allows SSH traffic
- Security group / network ACL permits inbound SSH (cloud instances)
Authentication Failed
Symptom: "Authentication failed" after entering credentials.
Solutions:
| Auth Method | Fix |
|---|---|
| SSH Agent | Run ssh-add -l to verify keys are loaded. Add with ssh-add ~/.ssh/id_ed25519 |
| Key File | Check permissions: chmod 600 ~/.ssh/id_* and chmod 700 ~/.ssh/ |
| Password | Verify username is correct. Some servers disable password auth. |
Test from terminal first:
ssh -v user@hostThe -v flag shows which authentication methods are attempted and why they fail.
Host Key Changed
Symptom: "Host key verification failed" or "REMOTE HOST IDENTIFICATION HAS CHANGED".
Cause: The server's SSH key changed (reinstalled OS, different server at same IP, or potential MITM attack).
If you trust the change:
- The app shows a dialog with the new fingerprint
- Click Accept New Key to update your known hosts
- Or manually:
ssh-keygen -R hostnamethen reconnect
If unexpected: Do not connect. Verify with your server administrator.
Agent Deployment Failed
Symptom: "Failed to deploy agent" after connecting.
The app uploads crab-desktop-agent to ~/.crab/bin/ on the remote server.
Check:
- Disk space:
df -h ~— need ~20 MB free - Permissions:
ls -la ~/.crab/bin/— binary must be executable - Architecture mismatch: The app detects remote arch (x86_64/aarch64) and uploads the matching binary. If detection fails, check
uname -mon the remote. - Kill stale agent:
pkill crab-desktop-agenton the remote, then reconnect
High Latency
Symptom: Remote operations feel slow (> 500ms for file tree, > 1s for diffs).
Solutions:
- Enable compression: Edit the connection profile → enable compression
- Check connection quality: SSH view → Connection Diagnostics shows RTT and bandwidth
- Adaptive caching: The app automatically increases cache TTLs for slow connections. You can also manually increase in the connection profile.
- Reduce prefetch: For very slow connections, disable prefetch in connection settings
Connection Drops
Symptom: "Connection lost" messages, operations fail intermittently.
What happens automatically:
- The app reconnects with exponential backoff (1s, 2s, 4s, up to 60s)
- Read operations use cached data during reconnection
- Write operations queue and retry after reconnection
If drops are frequent:
- Check network stability (Wi-Fi vs wired)
- Add
ServerAliveInterval 30to your SSH config for the host - Check if the server has an idle timeout (some cloud providers disconnect after inactivity)
- Use a jump host if the direct connection is unreliable
Port Forwarding Issues
Symptom: Port forward fails or service isn't accessible.
Check:
- The remote service is actually listening:
ss -tlnp | grep PORTon the remote - The local port isn't already in use:
lsof -i :PORTlocally - The remote service binds to
0.0.0.0or127.0.0.1(not just a specific interface)
Remote Repository Not Detected
Symptom: Browsing remote files but "Open as Repository" doesn't appear.
Check: The directory must contain a .git folder. Navigate into the correct directory — the button appears when .git is detected in the current path.