https://github.com/qiuhaotc/webssh
WebSSH allows you to SSH to your remote host anytime, anywhere.
https://github.com/qiuhaotc/webssh
secure-shell ssh ssh-client web-ssh web-terminal webssh webterminal
Last synced: 4 months ago
JSON representation
WebSSH allows you to SSH to your remote host anytime, anywhere.
- Host: GitHub
- URL: https://github.com/qiuhaotc/webssh
- Owner: qiuhaotc
- License: apache-2.0
- Created: 2020-08-23T08:30:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-21T05:22:28.000Z (11 months ago)
- Last Synced: 2025-03-21T06:19:59.354Z (11 months ago)
- Topics: secure-shell, ssh, ssh-client, web-ssh, web-terminal, webssh, webterminal
- Language: C#
- Homepage: https://webssh.azurewebsites.net
- Size: 4.36 MB
- Stars: 37
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebSSH
English | [δΈζ](README_CN.md)
WebSSH allows you to SSH to your remote host anytime, anywhere.
## Demonstrate Page
Check , you can use any login name and password to logged in.
## Usage
### Login
Input the user name and password and captcha to login, user name and password configured in appsettings.json

### Management Connection

### Connected To Server, Running Command
Press the Connect button, connect to the remote server, then run whatever command you want.
Go to management page, will list all available connected servers.
Features:
1. Multi lines command
2. Recall command, in single line mode, press arrow up and down can switch command from history
3. Press "ctrl + c" can run command "^C", support "ctrl + [a-z]"


## Real-time (SignalR) Enhancements
From the latest version, WebSSH replaces periodic HTTP polling with ASP.NET Core SignalR for a truly real-time terminal experience:
| Area | Before | Now (SignalR) |
| ---- | ------ | -------------- |
| Output refresh | 1s / 100ms adaptive polling | Push as soon as data arrives |
| Bandwidth | Repeated empty responses | Only actual output payloads |
| Command send | HTTP GET endpoint | Bi-directional hub method `RunCommand` |
| Initial backlog | Multiple fetches | Single join flush + streaming |
| Reconnect | Full page reliance | Automatic hub reconnect with status messages |
Key benefits:
1. Lower latency for interactive workflows (vim, tail -f, etc.).
2. Reduced server & network overhead β no useless polling cycles.
3. Better UX with connection state (Connected / Reconnecting / Disconnected).
4. Extensible channel for future features (file upload, terminal resize, heartbeat).
Technical notes:
* Hub path: `/shellHub`
* Group isolation: each browser session + shell GUID => SignalR group
* Still keeps an output queue for initial backlog replay on (re)join
* Automatic reconnect enabled; transient drops will not lose buffered output
* Legacy endpoints (`GetShellOutput`, `IsConnected`, `RunShellCommand`) have been removed after migration
Planned (roadmap ideas):
* Terminal resizing sync (cols/rows)
* Structured output channels (stdout/stderr separation)
* Optional rate limiting / flood protection
* Audit log of executed commands
* ~~Secure copy (SCP / SFTP) integration~~ β
**Completed**
## File Transfer Features
WebSSH now supports secure file upload and download to/from remote servers via SFTP with a professional tab-based interface:
### File Upload
- **Tab-based Interface**: Separate tabs for Shell Console and File Upload
- **Multiple File Support**: Upload up to 3 files simultaneously (configurable)
- **File Size Limits**: Maximum 10MB per file (configurable)
- **Rate Limiting**: IP-based limiting (20 files per hour, configurable)
- **Real-time Progress**: Live upload status via SignalR
- **SFTP Integration**: Secure transfer using existing SSH connections
### File Download
- **Remote File Browser**: Navigate and browse remote directory structure
- **Multi-file Selection**: Download up to 3 files per operation (configurable)
- **ZIP Archive Support**: Multiple files automatically packaged for download
- **Size Limits**: Maximum 20MB total download size (configurable)
- **Rate Limiting**: IP-based limiting (20 downloads per hour, configurable)
- **Real-time Progress**: Live download status via SignalR
### Live Demo
π― **[Interactive Demo](https://raw.githubusercontent.com/qiuhaotc/WebSSH/master/docs/demo.html)** - Try the file upload/download interface
### Configuration
File transfer restrictions can be configured in `appsettings.json`:
```json
{
"ShellConfiguration": {
"MaxFilesPerUpload": 3,
"MaxFileSizeMB": 10,
"MaxFilesPerHour": 20,
"MaxFilesPerDownload": 3,
"MaxDownloadSizeMB": 20,
"MaxDownloadsPerHour": 20
}
}
```
### Implementation Details
π **[Complete Implementation Summary](https://github.com/qiuhaotc/WebSSH/blob/master/docs/implementation-summary.md)** - Detailed technical documentation of all changes, features, and architecture decisions made during development
## Deployment Via Docker
Running your server at port 8070, config the password "your_password" to your own.
```bash
docker pull qiuhaotc/webssh
docker run -d --name webssh -p 8070:8080 -e ShellConfiguration__Users__0__Password="your_password" --restart=always qiuhaotc/webssh
```
## Misc
| Status | Value |
| :---------------- | :----------------------------------------------------------------------------------------------------------------------------: |
| Stars | [](https://github.com/qiuhaotc/WebSSH) |
| Forks | [](https://github.com/qiuhaotc/WebSSH) |
| License | [](https://github.com/qiuhaotc/WebSSH) |
| Issues | [](https://github.com/qiuhaotc/WebSSH) |
| Docker Pulls | [](https://hub.docker.com/r/qiuhaotc/webssh) |
| Release Downloads | [](https://github.com/qiuhaotc/WebSSH/releases) |