A modern web-based SSH terminal manager with file explorer and text editor capabilities.
- Multi-Server Management: Connect to multiple SSH servers simultaneously
- Terminal Emulation: Full xterm.js terminal with color support
- File Explorer: Browse, upload, download, and delete files on remote servers
- Text Editor: Monaco Editor (VS Code engine) for editing files directly in the browser
- Real-time Metrics: CPU, memory, and disk usage monitoring
- Authentication: JWT-based secure authentication
- Encrypted Storage: All server credentials are encrypted at rest
- React 19
- Vite
- TailwindCSS
- Socket.IO Client
- xterm.js (terminal emulation)
- Monaco Editor (code editing)
- Node.js
- Express
- Socket.IO
- SSH2 (SSH connections)
- JWT authentication
- LowDB (encrypted JSON database)
- Node.js 18+ and npm
- A server to deploy to (Linux recommended)
- PM2 for process management (optional but recommended)
- Clone the repository:
git clone <your-repo-url>
cd ssh-web- Install backend dependencies:
cd backend
npm install- Install frontend dependencies:
cd ../frontend
npm install- Configure environment variables:
cd ../backend
cp .env.example .env
nano .envEdit the .env file and set:
JWT_SECRET: Generate a secure random string (64+ characters)CREDENTIALS_ENCRYPTION_KEY: 64-character hex stringCREDENTIALS_ENCRYPTION_IV: 32-character hex stringFRONTEND_URL: Your frontend URL for CORSPORT: Backend port (default: 7842)
Generate secure keys:
# JWT Secret
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
# Encryption Key
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Encryption IV
node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"- Build the frontend:
cd ../frontend
npm run build- Configure your web server (nginx example):
# Frontend (React app)
server {
listen 443 ssl;
server_name ssh.yourdomain.com;
root /var/www/ssh-web/frontend/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# SSL configuration
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
}
# Backend API
server {
listen 7842 ssl;
server_name ssh.yourdomain.com;
location / {
proxy_pass http://localhost:7842;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}- Start the backend:
cd backend
npm start
# Or with PM2:
pm2 start server.js --name ssh-backend- Navigate to your frontend URL
- Register a new account
- Login with your credentials
- Add SSH servers using the "+" button
- Click a server to connect
- Use the terminal, file explorer, and text editor features
- All server credentials are encrypted using AES-256-CBC before storage
- JWT tokens are used for authentication
- WebSocket connections are secured
- Always use HTTPS in production
- Never commit
.envfiles ordb.jsonto version control - Regularly update dependencies for security patches
Backend:
cd backend
npm run dev # Uses nodemon for auto-reloadFrontend:
cd frontend
npm run dev # Vite dev server with HMRssh-web/
├── backend/
│ ├── middleware/ # Auth, rate limiting, etc.
│ ├── routes/ # Express routes
│ ├── services/ # SSH manager, etc.
│ ├── utils/ # Database, metrics, etc.
│ ├── websocket/ # Socket.IO handlers
│ └── server.js # Entry point
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ └── services/ # WebSocket service
│ ├── public/
│ └── index.html
└── README.md
MIT License - See LICENSE file for details
Contributions are welcome! Please open an issue or submit a pull request.
For issues or questions, please open an issue on GitHub.