General Questions
What is SuSHi?
What is SuSHi?
- Secure SSH connections with encrypted private key storage
- Web-based terminal accessible from any browser
- OAuth authentication (Google and GitHub)
- Real-time bidirectional communication
- Multi-user support with user-specific machine management
Is SuSHi production-ready?
Is SuSHi production-ready?
- Set
HttpOnly: truefor cookies in production - Enable
Secure: truefor HTTPS deployments - Configure proper host key verification instead of
InsecureIgnoreHostKey() - Implement rate limiting and authentication throttling
- Use strong, unique JWT secrets
What are the system requirements?
What are the system requirements?
- Docker and Docker Compose
- 512MB+ RAM for backend service
- PostgreSQL 12+ (provided via Docker)
- Port 8080 available (or custom port)
- Modern web browser with WebSocket support
- Internet connection to SuSHi server
- No special software or extensions required
How is data stored and secured?
How is data stored and secured?
- Algorithm: AES-CFB encryption
- Key Derivation: PBKDF2-HMAC-SHA256 with 10,000 iterations
- Unique salt and IV (Initialization Vector) for each encryption
- User password required for decryption
- PostgreSQL stores user data, machine configurations, and encrypted private keys
- Passwords used for encryption are not stored (user must enter on connection)
- JWT tokens for session management
Authentication
What authentication methods are supported?
What authentication methods are supported?
-
Google OAuth
- Requires Google Client ID and Client Secret
- Redirect URL:
http://localhost:8080/api/v1/auth/callback
-
GitHub OAuth
- Requires GitHub Client ID and Client Secret
- Redirect URL:
http://localhost:8080/api/v1/auth/callback
How do I set up OAuth authentication?
How do I set up OAuth authentication?
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Set authorized redirect URI:
http://localhost:8080/api/v1/auth/callback - Copy Client ID and Client Secret to docker-compose.yaml
- Go to Settings > Developer settings > OAuth Apps
- Create a new OAuth App
- Set Authorization callback URL:
http://localhost:8080/api/v1/auth/callback - Copy Client ID and generate a Client Secret
- Add credentials to docker-compose.yaml
https://yourdomain.com/api/v1/auth/callback).How long do sessions last?
How long do sessions last?
Can I use both Google and GitHub authentication simultaneously?
Can I use both Google and GitHub authentication simultaneously?
SSH Connections
What SSH authentication methods are supported?
What SSH authentication methods are supported?
- OpenSSH format
- RSA format
- Keys with or without passphrases
- Password-based SSH authentication
- SSH agent forwarding
- Certificate-based authentication
How do I add a new machine?
How do I add a new machine?
- Log in to SuSHi
- Navigate to the dashboard
- Click “Add Machine”
-
Provide the following information:
- Name: Friendly name for the machine
- Hostname: IP address or domain name
- Port: SSH port (typically 22)
- Username: SSH username on the remote machine
- Private Key: Your SSH private key
- Passphrase: (Optional) If your key is passphrase-protected
- Password: Password to encrypt the private key in database
- Organization: (Optional) For grouping machines
- Click “Save”
How do I connect to a machine?
How do I connect to a machine?
- From your dashboard, view your list of saved machines
- Click on the machine you want to connect to
- Enter the password you used when adding the machine (for decryption)
- Click “Connect”
- A web terminal will open with an active SSH session
Can multiple users connect to the same machine?
Can multiple users connect to the same machine?
- WebSocket connection
- SSH session
- UUID identifier
- Time bucket for tracking
What happens if my connection drops?
What happens if my connection drops?
- The SSH session on the server will be closed
- The connection will be removed from the active connection map
- You’ll need to reconnect through the dashboard
- A new UUID will be generated for the new connection
How are connections kept alive?
How are connections kept alive?
- Client sends heartbeat messages via WebSocket
- Server updates the time bucket for the connection
- Timestamps are rounded to the nearest minute for efficient tracking
- See controllers/ssh.go:134 for implementation details
Deployment
How do I deploy SuSHi?
How do I deploy SuSHi?
-
Create required directories:
-
Configure docker-compose.yaml with environment variables:
- Database credentials
- JWT secret
- OAuth client IDs and secrets
-
Start the services:
-
Access SuSHi at
http://localhost:8080
Can I use a different database?
Can I use a different database?
DB_HOSTDB_PORTDB_USERDB_PASSWORDDB_NAME
How do I update SuSHi?
How do I update SuSHi?
-
Pull the latest image:
-
Stop and remove containers:
-
Start with the new image:
Can I run SuSHi behind a reverse proxy?
Can I run SuSHi behind a reverse proxy?
- Ensure your reverse proxy passes WebSocket upgrade headers
- Configure timeout settings for long-lived connections
- Use
wss://in terminal.html when behind HTTPS - Set cookie
Secure: truein production
What ports does SuSHi use?
What ports does SuSHi use?
8080- SuSHi backend HTTP/WebSocket server5432- PostgreSQL database (container only)
Security
Is my private key secure?
Is my private key secure?
-
Encryption Process:
- You provide a password when adding a machine
- A random salt is generated
- PBKDF2 derives an encryption key from your password and salt (10,000 iterations)
- Private key is encrypted using AES-CFB
- Encrypted key, salt, and IV are stored in the database
-
Decryption Process:
- You enter your password when connecting
- The same key derivation process recreates the encryption key
- Private key is decrypted and used only in memory for the SSH connection
- Password is never stored
Should I use SuSHi for production servers?
Should I use SuSHi for production servers?
- Host key verification uses
InsecureIgnoreHostKey()(vulnerable to MITM attacks) - Cookies not fully hardened for production (HttpOnly, Secure flags)
- No built-in rate limiting or brute force protection
- Work in Progress status
- Use for development and non-critical environments
- Implement additional security hardening before production use
- Run behind a firewall with restricted access
- Use strong, unique passwords for key encryption
- Regular security audits and updates
What are the security best practices?
What are the security best practices?
-
Strong JWT Secret:
- Use a long, random string for
JWT_SECRET - Never commit secrets to version control
- Use a long, random string for
-
OAuth Configuration:
- Keep client secrets secure
- Use environment variables, not hardcoded values
- Restrict redirect URIs to your domain only
-
Database Security:
- Use strong database passwords
- Restrict database port exposure
- Regular backups with encryption
-
Network Security:
- Run behind HTTPS in production
- Use firewall rules to restrict access
- Consider VPN for additional security layer
-
Key Management:
- Use strong passwords for key encryption
- Rotate SSH keys regularly
- Delete unused machine configurations
Technical Questions
What technology stack does SuSHi use?
What technology stack does SuSHi use?
- Language: Go (Golang)
- Web Framework: Chi router
- WebSocket: Gorilla WebSocket
- SSH: golang.org/x/crypto/ssh
- Database: PostgreSQL
- Authentication: OAuth 2.0 (Google, GitHub)
- JWT: Custom implementation
- HTML/CSS/JavaScript
- WebSocket API for real-time communication
- Static files served by the backend
- Docker for containerization
- Docker Compose for orchestration
How does the WebSocket connection work?
How does the WebSocket connection work?
-
Connection Establishment:
- User connects to a machine and receives a UUID
- Browser opens WebSocket connection to
/ws?uuid={UUID} - Server upgrades HTTP connection to WebSocket
-
Communication Flow:
- User input → WebSocket → Server → SSH stdin → Remote machine
- Remote machine → SSH stdout → Server → WebSocket → Browser
-
Message Types:
heartbeat: Keep-alive messagesdata: Terminal input/output
-
Session Management:
- UUID maps to SSH connection in server memory
- Time buckets track active connections
- Goroutines handle bidirectional communication
Can I customize the terminal appearance?
Can I customize the terminal appearance?
static/terminal.html. The SSH session uses xterm terminal emulation with configurable:- Terminal type: “xterm” (line 109 in controllers/ssh.go)
- Dimensions: 600 rows × 800 columns (default)
- Terminal modes: Echo, input/output speed
What logging capabilities are available?
What logging capabilities are available?
Debug: Detailed debugging information (tokens, UUIDs, connections)Info: General informational messagesWarning: Warning messagesError: Error messages with stack traces
LOG_LEVEL environment variable in docker-compose.yaml.What’s Logged:- Authentication events (OAuth, JWT)
- SSH connection establishment and errors
- WebSocket connection lifecycle
- Database operations
- Encryption/decryption operations
Is there an API for programmatic access?
Is there an API for programmatic access?
GET /api/v1/auth/url?to={provider}- Get OAuth URLGET /api/v1/auth/callback- OAuth callbackPOST /api/v1/auth/logout- Logout
POST /api/v1/machines- Create machineGET /api/v1/machines- List machinesGET /api/v1/machines/{id}- Get machine detailsDELETE /api/v1/machines/{id}- Delete machinePOST /api/v1/machines/{id}/connect- Connect to machine
WS /ws?uuid={uuid}- Terminal WebSocket connection
Contributing and Support
How can I contribute to SuSHi?
How can I contribute to SuSHi?
-
Code Contributions:
- Fork the repository
- Create a feature branch
- Submit pull requests
-
Bug Reports:
- Open issues on GitHub
- Provide detailed reproduction steps
- Include logs and environment details
-
Documentation:
- Improve existing documentation
- Add examples and tutorials
- Translate documentation
-
Feature Requests:
- Suggest new features via GitHub issues
- Discuss implementation approaches
Where can I get help?
Where can I get help?
-
Documentation:
- Check the Troubleshooting Guide
- Review this FAQ
- Read the source README.md
-
GitHub Issues:
- Search existing issues
- Open a new issue with details
- Follow the issue template
-
Enable Debug Logging:
- Set
LOG_LEVEL=Debug - Review logs for specific errors
- Include relevant logs when asking for help
- Set
What are the known limitations?
What are the known limitations?
-
Authentication:
- Only OAuth (no local accounts)
- Only private key SSH auth (no password auth)
-
Security:
- Host key verification disabled (
InsecureIgnoreHostKey) - Cookie security settings need hardening for production
- Host key verification disabled (
-
Features:
- No file transfer capabilities (SCP/SFTP)
- No SSH agent forwarding
- No port forwarding
- No session recording/playback
- No collaborative terminals
-
Deployment:
- Single-instance only (no horizontal scaling)
- In-memory connection storage (lost on restart)