https://github.com/razikus/go-ssh-to-websocket
Super simple SSH to websocket written in GO. With XTERM example to consume also
https://github.com/razikus/go-ssh-to-websocket
ssh ssh-client ssh-to-websocket ssh-tunnel
Last synced: 25 days ago
JSON representation
Super simple SSH to websocket written in GO. With XTERM example to consume also
- Host: GitHub
- URL: https://github.com/razikus/go-ssh-to-websocket
- Owner: Razikus
- License: mit
- Created: 2024-04-26T13:15:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-14T08:48:11.000Z (over 1 year ago)
- Last Synced: 2024-05-15T01:25:27.758Z (over 1 year ago)
- Topics: ssh, ssh-client, ssh-to-websocket, ssh-tunnel
- Language: CSS
- Homepage:
- Size: 4.26 MB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GO SSH TO WEBSOCKET
This project does exactly what it says
It's an proxy written in GO that allows to connect to SSH server over WebSocket - just from your browser
I wrote it for other project, but maybe will be useful for somebody

## Features
- SSH connection via WebSockets
- Web-based terminal emulation using [xterm.js](https://xtermjs.org/)
- Environment variable configuration for SSH credentials (password based) and settings
- Dockerized## Running in docker
```
docker run -p 8280:8280 -e SSH_USER=USER -e SSH_PASS=PASS -e SSH_HOST=HOST -e SSH_PORT=PORT --rm docker.io/razikus/sshtows:1.0.1
```
Go to http://localhost:8280 and you will see terminal
## Configuration
Available env variables
```
SSH_USER="your_username"
SSH_PASS="your_password"
SSH_HOST="ssh.example.com"
SSH_PORT="22"
MOUNT_HTML="true"
```## Docker compose with basic auth and simple SSH container
- 13.05.2024 - just added simple SSH container to make ability to log in inside the system out of the box.
In docker-compose there is example how to setup basic proxy with basic auth
In order to change credentials from default (admin : admin) user need to follow traefik tutorial
```
https://doc.traefik.io/traefik/middlewares/http/basicauth/
```Here you can create htpasswd online (remember to escape $ with $$)
```
https://hostingcanada.org/htpasswd-generator/
```