Skip to content

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)

License

Notifications You must be signed in to change notification settings

asimovo-platform/wetty

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WeTTY = Web + TTY.

All Contributors

Documentation License: MIT

Terminal access in browser over http/https

WeTTY

Terminal over HTTP and https. WeTTY is an alternative to ajaxterm and anyterm but much better than them because WeTTY uses xterm.js which is a full fledged implementation of terminal emulation written entirely in JavaScript. WeTTY uses websockets rather than Ajax and hence better response time.

Prerequisites

  • node >=18
  • make
  • python
  • build-essential

Install

npm -g i wetty

Usage

$ wetty --help
Options:
  --help, -h      Print help message                                   [boolean]
  --version       Show version number                                  [boolean]
  --conf          config file to load config from                       [string]
  --ssl-key       path to SSL key                                       [string]
  --ssl-cert      path to SSL certificate                               [string]
  --ssh-host      ssh server host                                       [string]
  --ssh-port      ssh server port                                       [number]
  --ssh-user      ssh user                                              [string]
  --title         window title                                          [string]
  --ssh-auth      defaults to "password", you can use "publickey,password"
                  instead                                               [string]
  --ssh-pass      ssh password                                          [string]
  --ssh-key       path to an optional client private key (connection will be
                  password-less and insecure!)                          [string]
  --ssh-config    Specifies an alternative ssh configuration file. For further
                  details see "-F" option in ssh(1)                     [string]
  --force-ssh     Connecting through ssh even if running as root       [boolean]
  --known-hosts   path to known hosts file                              [string]
  --base, -b      base path to wetty                                    [string]
  --port, -p      wetty listen port                                     [number]
  --host          wetty listen host                                     [string]
  --command, -c   command to run in shell                               [string]
  --allow-iframe  Allow wetty to be embedded in an iframe, defaults to allowing
                  same origin                                          [boolean]

Open your browser on http://yourserver:3000/wetty and you will prompted to login. Or go to http://yourserver:3000/wetty/ssh/<username> to specify the user beforehand.

If you run it as root it will launch /bin/login (where you can specify the user name), else it will launch ssh and connect by default to localhost. The SSH connection can be forced using the --force-ssh option.

If instead you wish to connect to a remote host you can specify the --ssh-host option, the SSH port using the --ssh-port option and the SSH user using the --ssh-user option.

Check out the Flags docs for a full list of flags

Docker container

To use WeTTY as a docker container, a docker image is available on docker hub. To run this image, use

docker run --rm -p 3000:3000 wettyoss/wetty --ssh-host=<YOUR-IP>

and you will be able to open a ssh session to the host given by YOUR-IP under the URL http://localhost:3000/wetty.

It is recommended to drive WeTTY behind a reverse proxy to have HTTPS security and possibly Let’s Encrypt support. Popular containers to achieve this are nginx-proxy and traefik. For traefik there is an example docker-compose file in the containers directory.

FAQ

Check out the docs

What browsers are supported?

WeTTY supports all browsers that xterm.js supports.

Author

πŸ‘€ Cian Butler butlerx@notthe.cloud

Contributing ✨

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Please read the development docs for installing from source and running is dev node

Thanks goes to these wonderful people (emoji key):

Cian Butler
Cian Butler

πŸ’» πŸ“–
Krishna Srinivas
Krishna Srinivas

πŸ’»
acalatrava
acalatrava

πŸ’»
Strubbl
Strubbl

πŸ’»
Oleg Kurapov
Oleg Kurapov

πŸ’»
Boyan Rabchev
Boyan Rabchev

πŸ’»
Jimmy
Jimmy

πŸ’»
Luca Milanesio
Luca Milanesio

πŸ’»
Anthony Jund
Anthony Jund

πŸ’»
mirtouf
mirtouf

πŸ’»
Bertrand Roussel
Bertrand Roussel

πŸ’»
Ben Letchford
Ben Letchford

πŸ’»
SouraDutta
SouraDutta

πŸ’»
Koushik M.L.N
Koushik M.L.N

πŸ’»
Imuli
Imuli

πŸ’»
perpen
perpen

πŸ’»
Nathan LeClaire
Nathan LeClaire

πŸ’»
Mihir Kumar
Mihir Kumar

πŸ’»
Chris Suszynski
Chris Suszynski

πŸ’»
Felix Bartels
Felix Bartels

πŸ’»
Jarrett Gilliam
Jarrett Gilliam

πŸ’»
Harry Lee
Harry Lee

πŸ’»
Andreas KlΓΆckner
Andreas KlΓΆckner

πŸ’»
DenisKramer
DenisKramer

πŸ’»
Vamshi K Ponnapalli
Vamshi K Ponnapalli

πŸ’»
Tri Nguyen
Tri Nguyen

πŸ“–
Felix Pojtinger
Felix Pojtinger

πŸ“–
Neale Pickett
Neale Pickett

πŸ’»
Matthew Piercey
Matthew Piercey

πŸ“–
Kasper Holbek Jensen
Kasper Holbek Jensen

πŸ“–
Farhan Khan
Farhan Khan

πŸ’»
Jurre Vriesen
Jurre Vriesen

πŸ’»
James Turnbull
James Turnbull

πŸ’»
Dean Shub
Dean Shub

πŸ’»
lozbrown
lozbrown

πŸ’» πŸ’‘
sergeir82
sergeir82

πŸ’»
Kyle Lucy
Kyle Lucy

πŸ’»
userdocs
userdocs

πŸ“–
Janos Kasza
Janos Kasza

πŸ’»
Grant Handy
Grant Handy

πŸ“–
Leszek BΕ‚aΕΌewski
Leszek BΕ‚aΕΌewski

πŸ’» πŸ“¦

This project follows the all-contributors specification. Contributions of any kind welcome!

Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

Copyright Β© 2019 Cian Butler butlerx@notthe.cloud.
This project is MIT licensed.


About

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 65.0%
  • JavaScript 26.9%
  • HTML 2.0%
  • SCSS 1.9%
  • Shell 1.6%
  • Dockerfile 1.3%
  • CSS 1.3%