The following content from the Wetty profile, environmental preparation, Wetty installation, and validation of the analysis, please see below for details.
1. Wetty Introduction
Wetty is an open-source web-based SSH developed using Node.js and WebSockets. For more information on web-based SSH please refer to Https://en.wikipedia.org/wiki/Web-based_SSH.
and Wetty information please refer to Https://github.com/krishnasrinivas/wetty.
2. Environmental preparedness
Because the Wetty is written using node.js, we have to install the relevant node.js environment beforehand. Please take a look at this blog post.
3. Wetty Installation
Run the following command to install the
$ git clone https://github.com/krishnasrinivas/wetty
$ CD Wetty
$ sudo npm install
The installation process may be wrong, please refer to the following possible problem handling.
4. Verify
After the installation is complete, then run the following command to start the Wetty service and listen for the 3000 port number.
$ node App.js-p 3000
Then open the browser, enter the http://127.0.0.1:3000, and then enter the password to login successfully after the command line operation, the effect shown in the following figure,
5. Possible problem-handling
5.1 Installation times error: ' Use ' isn't ' a ' node::buffer '
Because the node I installed is version 4.1.1, it's too new. And Wetty originally rely on the pty.js too old, lead to compile problems. Modify the Package.json in the following Wetty source code directory to modify the dependent pty.js to the latest version 0.3.0 (originally ^0.2.7-1). Save the file, and then rerun the sudo npm install command.
5.2 SSH Access failed
After starting the Wetty service, enter the http://127.0.0.1:3000 times in the browser a "ssh:connect to host localhost port 22:connection refused" error similar to the screenshot below.
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
PS: Learn Linux TTY command
The TTY command is used to print the terminal name of the connection to the standard input, and if the display is/dev/console, then the terminal is a console terminal;
If/dev/pts/n is displayed, the terminal is a virtual terminal (a remote connection to the Linux server terminal). Verify that the standard input is a terminal by looking at the return code executed by the TTY command 0.
sh-# TTY
/dev/console
sh-# echo $?
0
sh-# TTY
/dev/pts/6
With the following command, we know that/dev/console is a character device (the Linux system regards almost all devices as files),
sh-# ls-l/dev/console
crw-r--r--1 root 5, 1 out of 1 00:11/dev/console
The above is a small set to share the Linux system under the installation of Wetty and use instructions, I hope you like.