The following content analyzes from the introduction of wetty, environment preparation, wetty installation, and verification.For details, please see below.
wetty is an open source web-based ssh developed using node.js and websockets. Please refer to web-based ssh for more information.
For the details of wetty, please refer tohttps://github.com/krishnasrinivas/wetty.
Because wetty is written in node.js, we need to install the relevant node.js environment in advance. Check out this blog post.
3. wetty installation
Run the following command to install,
$sudo npm install
The installation process may go wrong.Please refer to the possible problems below.
After the installation is complete,Then run the following command to start the wetty service and listen on port 3000.
$node app.js -p 3000
Then open your browser,Enter and then enter the password. After successful login, you can perform command line operations.Results as shown below,
5. Possible problem handling
5.1 Installation error:"use" is not a member of "node ::buffer"
Because the node I installed is version 4.1.1, it is too new. The pty.js that wetty originally relied on is too old, causing compilation problems.Modify the package.json in the following wetty source code directory, and modify the dependent pty.js to the latest version 0.3.0 (originally ^ 0.2.7-1). save document,Then re-run the sudo npm install command.
5.2 ssh access failed
After starting the wetty service, an error similar to the following screenshot "ssh:connect to host localhost port 22:connection refused" was reported when typing in the browser.
Run the following commands 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 command
The tty command is used to print the name of the terminal connected to standard input.If/dev/console is displayed, this terminal is a console terminal;
If/dev/pts/n is displayed, the terminal is a virtual terminal (a terminal connected to the linux server remotely). By checking that the return code of the tty command is 0, confirm that the standard input is a terminal.
sh- #echo $?
With the following command,We know that/dev/console is a character device (the Linux system treats almost all devices as files),
sh- #ls -l/dev/console
crw-r--r-- 1 root root 5, 1 jan 1 00:11/dev/console
The above are the installation and use instructions for tty under linux system that we share with you.Hope you like it.
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- dart - flutter: the instance member'stars' can't be accessed in an initializer error