Install and use Wetty in Linux
1. Wetty Introduction
Wetty is an open source Web-based SSH developed using Node. js and websockets. For more information about Web-based SSH, see https://en.wikipedia.org/wiki/web-based_ssh.
For more information about wetty, see https://github.com/krishnasrinivas/wetty.
2. Prepare the environment
Because wetty is written using Node. js, We need to install the relevant Node. js environment in advance. Please refer to this blog.
3. Install Wetty
Run the following command to install,
$ Git clone https://github.com/krishnasrinivas/wetty
$ Cd wetty
$ Sudo npm install
An error may occur during the installation process. refer to the following solutions for possible problems.
4. Verify
After the installation is complete, run the following command to start the wetty service and listen to the port number 3000,
$ Node app. js-p 3000
Open the browser, enter http: // 127.0.0.1: 3000, and then enter the password to log in successfully. Then, you can perform the command line operation, as shown in,
5. Possible troubleshooting
5.1 error upon installation: 'use' is not a member of 'node: buffer'
Because the Node I installed is of version 4.1.1, it is too new. However, wetty's originally dependent pty. js is too old, leading to compilation problems. Modify package. json in the following wetty source code directory and change the dependent pty. js to the latest version 0.3.0 (originally ^ 0.2.7-1 ). Save the file and run the sudo npm install command again.
5.2 ssh access failed
After the wetty service is started, enter http: // 127.0.0.1: 3000 in the browser to report an error similar to the following "ssh: connect to host localhost port 22: Connection refused.
Run the following command to reinstall openssl-client and openssl-server,
$ Sudo apt-get remove openssh-client openssh-server
$ Sudo apt-get installopenssh-client openssh-server
(Done)
This article permanently updates the link address: