How to install Wetty in Linux

0
340

Wetty

We regularly connect to remote systems using ssh or telnet.But, Wetty provides terminal access over HTTP and https in web browser. Simply Wetty means web+tty(Linux Terminal Access in Browser).

In this article, We will be known about the installation of Wetty on CentOs and RHEL.

First, install the prerequisites like  Epel repository, nodejs and npm by using the following command.

#yum -y install epel-release 
#yum -y install nodejs npm git

Now clone Wetty by using the following command

#git clone https://github.com/krishnasrinivas/wetty

Once it completes run the following commands to start the installation

#cd wetty
#npm install

sample Output:

[root@server wetty]# npm install
npm WARN deprecated static-favicon@1.0.0: use serve-favicon module
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> pty.js@0.3.1 install /root/wetty/node_modules/pty.js
> node-gyp rebuild

make: Entering directory `/root/wetty/node_modules/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
  SOLINK_MODULE(target) Release/obj.target/pty.node
  COPY Release/pty.node
make: Leaving directory `/root/wetty/node_modules/pty.js/build'
wetty@0.2.0 /root/wetty
├─┬ express@3.5.1
│ ├── buffer-crc32@0.2.1
│ ├─┬ commander@1.3.2
│ │ └── keypress@0.1.0
│ ├─┬ connect@2.14.1
│ │ ├── basic-auth-connect@1.0.0
│ │ ├── bytes@0.2.1
│ │ ├─┬ compression@1.0.0
│ │ │ ├── compressible@1.0.0
│ │ │ └── negotiator@0.3.0
│ │ ├── connect-timeout@1.0.0
│ │ ├─┬ cookie-parser@1.0.1
│ │ │ └── cookie@0.1.0
│ │ ├─┬ csurf@1.0.0
│ │ │ └── uid2@0.0.3
│ │ ├── errorhandler@1.0.0
│ │ ├─┬ express-session@1.0.2
│ │ │ ├── cookie@0.1.0
│ │ │ ├── debug@0.7.4
│ │ │ └── utils-merge@1.0.0
│ │ ├── method-override@1.0.0
│ │ ├── morgan@1.0.0
│ │ ├─┬ multiparty@2.2.0
│ │ │ ├─┬ readable-stream@1.1.14
│ │ │ │ ├── core-util-is@1.0.2
│ │ │ │ └── string_decoder@0.10.31
│ │ │ └── stream-counter@0.2.0
│ │ ├── pause@0.0.1
│ │ ├── qs@0.6.6
│ │ ├── raw-body@1.1.3
│ │ ├── response-time@1.0.0
│ │ ├─┬ serve-index@1.0.1
│ │ │ ├── batch@0.5.0
│ │ │ └── negotiator@0.4.2
│ │ ├── serve-static@1.0.2
│ │ ├── static-favicon@1.0.0
│ │ └── vhost@1.0.0
│ ├── cookie@0.1.1
│ ├── cookie-signature@1.0.3
│ ├── debug@0.8.1
│ ├── fresh@0.2.2
│ ├── merge-descriptors@0.0.2
│ ├── methods@0.1.0
│ ├── mkdirp@0.3.5
│ ├── range-parser@1.0.0
│ └─┬ send@0.2.0
│   └── mime@1.2.11
├─┬ grunt@0.4.5
│ ├── async@0.1.22
│ ├── coffee-script@1.3.3
│ ├── colors@0.6.2
│ ├── dateformat@1.0.2-1.2.3
│ ├── eventemitter2@0.4.14
│ ├── exit@0.1.2
│ ├─┬ findup-sync@0.1.3
│ │ ├─┬ glob@3.2.11
│ │ │ ├── inherits@2.0.3
│ │ │ └── minimatch@0.3.0
│ │ └── lodash@2.4.2
│ ├── getobject@0.1.0
│ ├─┬ glob@3.1.21
│ │ ├── graceful-fs@1.2.3
│ │ └── inherits@1.0.2
│ ├─┬ grunt-legacy-log@0.1.3
│ │ ├─┬ grunt-legacy-log-utils@0.1.1
│ │ │ ├── lodash@2.4.2
│ │ │ └── underscore.string@2.3.3
│ │ ├── lodash@2.4.2
│ │ └── underscore.string@2.3.3
│ ├── grunt-legacy-util@0.2.0
│ ├── hooker@0.2.3
│ ├── iconv-lite@0.2.11
│ ├─┬ js-yaml@2.0.5
│ │ ├─┬ argparse@0.1.16
│ │ │ └── underscore.string@2.4.0
│ │ └── esprima@1.0.4
│ ├── lodash@0.9.2
│ ├─┬ minimatch@0.2.14
│ │ ├── lru-cache@2.7.3
│ │ └── sigmund@1.0.1
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.0.9
│ ├── rimraf@2.2.8
│ ├── underscore.string@2.2.1
│ └── which@1.0.9
├── grunt-contrib-clean@0.6.0
├─┬ grunt-git@0.3.7
│ └─┬ flopmang@0.0.1
│   ├── underscore@1.7.0
│   └── underscore.string@2.4.0
├── grunt-mkdir@0.1.3
├─┬ grunt-shell@1.3.1
│ ├─┬ chalk@1.1.3
│ │ ├── ansi-styles@2.2.1
│ │ ├── escape-string-regexp@1.0.5
│ │ ├─┬ has-ansi@2.0.0
│ │ │ └── ansi-regex@2.0.0
│ │ ├── strip-ansi@3.0.1
│ │ └── supports-color@2.0.0
│ ├─┬ npm-run-path@1.0.0
│ │ └── path-key@1.0.0
│ └── object-assign@4.1.0
├─┬ load-grunt-tasks@3.5.2
│ ├── arrify@1.0.1
│ ├─┬ multimatch@2.1.0
│ │ ├── array-differ@1.0.0
│ │ ├─┬ array-union@1.0.2
│ │ │ └── array-uniq@1.0.3
│ │ └─┬ minimatch@3.0.3
│ │   └─┬ brace-expansion@1.1.6
│ │     ├── balanced-match@0.4.2
│ │     └── concat-map@0.0.1
│ ├─┬ pkg-up@1.0.0
│ │ └─┬ find-up@1.1.2
│ │   ├── path-exists@2.1.0
│ │   └─┬ pinkie-promise@2.0.1
│ │     └── pinkie@2.0.4
│ └─┬ resolve-pkg@0.1.0
│   └── resolve-from@2.0.0
├─┬ optimist@0.6.1
│ ├── minimist@0.0.10
│ └── wordwrap@0.0.3
├─┬ pty.js@0.3.1
│ ├── extend@1.2.1
│ └── nan@2.3.5
└─┬ socket.io@1.7.2
  ├─┬ debug@2.3.3
  │ └── ms@0.7.2
  ├─┬ engine.io@1.8.2
  │ ├─┬ accepts@1.3.3
  │ │ ├─┬ mime-types@2.1.13
  │ │ │ └── mime-db@1.25.0
  │ │ └── negotiator@0.6.1
  │ ├── base64id@1.0.0
  │ ├── cookie@0.3.1
  │ ├── debug@2.3.3
  │ ├─┬ engine.io-parser@1.3.2
  │ │ ├── after@0.8.2
  │ │ ├── arraybuffer.slice@0.0.6
  │ │ ├── base64-arraybuffer@0.1.5
  │ │ ├── blob@0.0.4
  │ │ └── wtf-8@1.0.0
  │ └─┬ ws@1.1.1
  │   ├── options@0.0.6
  │   └── ultron@1.0.2
  ├─┬ has-binary@0.1.7
  │ └── isarray@0.0.1
  ├─┬ socket.io-adapter@0.5.0
  │ └── debug@2.3.3
  ├─┬ socket.io-client@1.7.2
  │ ├── backo2@1.0.2
  │ ├── component-bind@1.0.0
  │ ├── component-emitter@1.2.1
  │ ├── debug@2.3.3
  │ ├─┬ engine.io-client@1.8.2
  │ │ ├── component-emitter@1.2.1
  │ │ ├── component-inherit@0.0.3
  │ │ ├── debug@2.3.3
  │ │ ├── has-cors@1.1.0
  │ │ ├── parsejson@0.0.3
  │ │ ├── parseqs@0.0.5
  │ │ ├── xmlhttprequest-ssl@1.5.3
  │ │ └── yeast@0.1.2
  │ ├── indexof@0.0.1
  │ ├── object-component@0.0.3
  │ ├─┬ parseuri@0.0.5
  │ │ └─┬ better-assert@1.0.2
  │ │   └── callsite@1.0.0
  │ └── to-array@0.1.4
  └─┬ socket.io-parser@2.3.1
    ├── component-emitter@1.1.2
    ├─┬ debug@2.2.0
    │ └── ms@0.7.1
    └── json3@3.3.2

[root@server wetty]# 

Now start the wetty over http as follows

# node app.js -p 1234

Now we can access terminal through browser by using the address http://ip-address:1234 as follows

If we want to start over https run the following commands

# openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes
#nohup node app.js --sslkey key.pem --sslcert cert.pem -p 1234 &

Now we can access terminal through browser by using the address https://ip-address:1234 as follows

Now Enjoy terminal in your favorite browser. Have fun!

SHARE
Previous articleRabbitMQ installation on Linux
Next articleSentora installation on Linux
This is Naga Ramesh Reddy from Bangalore (India).I have 4+ years of experience in System and Network Administration field. I like to read and write about Linux, Cisco, Microsoft and DevOps technologies and the latest software releases. Particularly I am very interested about Linux flavors like Centos, RHEL, Ubuntu and Linux Mint.