In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to use the Linux Shell Web terminal tool shellinabox, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
@ font-face {font-family: "Times New Roman";} @ font-face {font-family: "Verdana";} @ font-face {font-family: "Microsoft Acer";} @ font-face {font-family: "Arial";} @ font-face {font-family: "Courier New";} @ font-face {font-family: "monospace";} p.MsoNormal {mso-style-name: text; mso-style-parent: "; margin:0pt Margin-bottom:.0001pt; mso-pagination:none; font-family: Microsoft Acer; mso-bidi-font-family:'Times New Roman'; font-size:10.5000pt;} span.10 {font-family;} span.15 {font-family: Microsoft Acer; color:rgb (5ther 99193); text-decoration:underline; text-underline:single;} span.msoIns {mso-style-type:export-only; mso-style-name: "; text-decoration:underline; text-underline:single Color:blue;} span.msoDel {mso-style-type:export-only; mso-style-name: "; text-decoration:line-through; color:red;} @ page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @ page Section0 {margin-top:72.0000pt; margin-bottom:72.0000pt; margin-left:90.0000pt; margin-right:90.0000pt; size:595.3000pt 841.9000pt; layout-grid:15.6000pt } div.Section0 {page:Section0;}
Linux Shell Web HyperTerminal tool shellinabox
Shell is a Linux kernel application, which refers to the software that "provides the user with an operating interface". It is also a command parser, which is similar to the cmd.exe application under the Windows operating system DOS. It receives user commands and then invokes corresponding applications. Users are generally accustomed to using client-side tools such as putty, Xshell, SecureCRT, secure shell and so on, but these clients need to be installed locally before they can be used. If you change to other computers, you also need to reinstall, which is very troublesome to use, so today we are going to introduce a very convenient shell client tool. Use the browser that comes with the system to manage the Linux service terminal, which can be managed on any terminal at any time. This tool shellinabox, which runs under linux, only needs to install and configure shellinabox on the Linux server.
Shellinabox is a Web-based terminal simulator created by Markus Gutschke. It has a built-in Shell Web server, runs as a Web-based SSH client on a designated port, and prompts you to use any browser that supports AJAX/JavaScript and CSS to remotely access and control Linux Server SSH Shell without any other browser plug-ins. It is very convenient to use, but a little bit of Linux foundation is required for installation and configuration. If you feel that you do not understand Linux at all, you can suggest to buy the tutorial "Linux should learn this way". Very suitable for beginners, or go to the official website of this course to view detailed information, directly enter the title of this book in Baidu can directly enter the official website.
Shellinbox is a basic web ssh client with a built-in web server under the Linux server, which allows you to access the ssh shell of the linux server through a specified port, as long as your browser supports AJAX/JS/CSS, but now the browsers of the mainstream operating systems all support it. Shellinabox is an open source lightweight software, so before installing shellinabox, make sure whether the Linux server has openssl libraries installed. Debian and ubuntu officially provide deb installation package, while centos also has rpm package, which can also be installed through yum source, and installation and configuration are relatively simple. Let's install and configure shellinabox in detail below.
1. The steps of installation and configuration on RHEL and CentOS systems are as follows
# yum install openssl shellinabox
Loaded plugins: fastestmirror
Determining fastest mirrors
Epel/x86_64/metalink | 9.2 kB 00:00:00
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Base | 3.6 kB 00:00:00
Epel | 3.2 kB 00:00:00
Extras | 3.4 kB 00:00:00
Updates | 3.4 kB 00:00:00
(1x6): extras/7/x86_64/primary_db | 156 kB 00:00:00
(2can6): base/7/x86_64/group_gz | 166kB 00:00:01
(3x6): epel/x86_64/updateinfo | 940 kB 00:00:08
(4can6): updates/7/x86_64/primary_db | 1.3 MB 00:00:10
(5can6): epel/x86_64/primary | 3.6 MB 00:00:21
(6x6): base/7/x86_64/primary_db | 6.0MB 00:00:26
Epel 12745/12745
Resolving Dependencies
-> Running transaction check
-- > Package openssl.x86_64 1:1.0.2k-12.el7 will be updated
-- > Package openssl.x86_64 1:1.0.2k-16.el7 will be an update
-- > Processing Dependency: openssl-libs (x86-64) = 1:1.0.2k-16.el7 for package: 1:openssl-1.0.2k-16.el7.x86_64
-> Package shellinabox.x86_64 0RU 2.20-5.el7 will be installed
-> Running transaction check
-- > Package openssl-libs.x86_64 1:1.0.2k-12.el7 will be updated
-- > Processing Dependency: openssl-libs (x86-64) = 1:1.0.2k-12.el7 for package: 1:openssl-devel-1.0.2k-12.el7.x86_64
-- > Package openssl-libs.x86_64 1:1.0.2k-16.el7 will be an update
-> Running transaction check
-- > Package openssl-devel.x86_64 1:1.0.2k-12.el7 will be updated
-- > Package openssl-devel.x86_64 1:1.0.2k-16.el7 will be an update
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Installing:
Shellinabox x8631 64 2.20-5.el7 epel 136k
Updating:
Openssl x86_64 1:1.0.2k-16.el7 base 493 k
Updating for dependencies:
Openssl-devel x86_64 1:1.0.2k-16.el7 base 1.5 M
Openssl-libs x86_64 1:1.0.2k-16.el7 base 1.2 M
Transaction Summary
=
Install 1 Package
Upgrade 1 Package (+ 2 Dependent packages)
Total download size: 3.3 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1x4): openssl-1.0.2k-16.el7.x86_64.rpm | 493rd kB 00:00:01
(2cap 4): shellinabox-2.20-5.el7.x86_64.rpm | 136 kB 00:00:01
(3x4): openssl-devel-1.0.2k-16.el7.x86_64.rpm | 1.5 MB 00:00:05
(4ache 4): openssl-libs-1.0.2k-16.el7.x86_64.rpm | 1.2 MB 00:00:05
-
Total 469 kB/s | 3.3 MB 00:00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating: 1:openssl-libs-1.0.2k-16.el7.x86_64 1/7
Updating: 1:openssl-1.0.2k-16.el7.x86_64 2/7
Installing: shellinabox-2.20-5.el7.x86_64 3 Universe 7
Updating: 1:openssl-devel-1.0.2k-16.el7.x86_64 4/7
Cleanup: 1:openssl-devel-1.0.2k-12.el7.x86_64 5/7
Cleanup: 1:openssl-1.0.2k-12.el7.x86_64 6/7
Cleanup: 1:openssl-libs-1.0.2k-12.el7.x86_64 7/7
Verifying: 1:openssl-libs-1.0.2k-16.el7.x86_64 1/7
Verifying: 1:openssl-devel-1.0.2k-16.el7.x86_64 2/7
Verifying: shellinabox-2.20-5.el7.x86_64 3 Universe 7
Verifying: 1:openssl-1.0.2k-16.el7.x86_64 4/7
Verifying: 1:openssl-devel-1.0.2k-12.el7.x86_64 5/7
Verifying: 1:openssl-1.0.2k-12.el7.x86_64 6/7
Verifying: 1:openssl-libs-1.0.2k-12.el7.x86_64 7/7
Installed:
Shellinabox.x86_64 0VOR 2.20-5.el7
Updated:
Openssl.x86_64 1:1.0.2k-16.el7
Dependency Updated:
Openssl-devel.x86_64 1:1.0.2k-16.el7 openssl-libs.x86_64 1:1.0.2k-16.el7
Complete!
2. Configure shellinaboxd
192.168.3.160 is the IP address of the SSH server
# vim / etc/sysconfig/shellinaboxd
# TCP port that shellinboxd's webserver listens on
PORT=6175
# specify the IP address of a destination SSH server
OPTS= "- s /: SSH:192.168.3.160" # (https protocol)
# OPTS= "- t-s /: SSH:192.168.3.160" # (http protocol)
# if you want to restrict access to shellinaboxd from localhost only
# the following configuration is for host access only, but not for other hosts
# OPTS= "- s /: SSH:192.168.3.160-- localhost-only"
The default port of shellinaboxd is: 4200, which I changed to 6175.
Help manual for the use of Shellinaboxd common parameters
# shellinaboxd-help
List of command line options:
-b,-- background [= PIDFILE] run in background
-c,-- cert=CERTDIR set certificate dir (default: $PWD)
-- cert-fd=FD set certificate file from fd
-- css=FILE attach contents to CSS style sheet
-- cgi [= PORTMIN-PORTMAX] run as CGI
-d,-- debug enable debug mode
-f,-- static-file=URL:FILE serve static file from URL path
-g,-- group=GID switch to this group (default: nobody)
-h,-- help print this message
-- linkify= [none | normal | aggressive] default is "normal"
-- localhost-only only listen on 127.0.0.1
-- no-beep suppress all audio output
-n,-- numeric do not resolve hostnames
-m,-- messages-origin=ORIGIN allow iframe message passing from origin
-- pidfile=PIDFILE publish pid of daemon process
-p,-- port=PORT select a port (default: 4200)
-s-- service=SERVICE define one or more services
-t,-- disable-ssl disable transparent SSL support
-- disable-ssl-menu disallow changing transport mode
-- disable-utmp-logging disable logging to utmp and wtmp
-Q,-- quiet turn off all messages
-- unixdomain-listen on unix socket
-u,-- user=UID switch to this user (default: nobody)
-- user-css=STYLES defines user-selectable CSS options
-v,-- verbose enable logging messages
-- version prints version information
-- disable-peer-check disable peer check on a session
Start, stop and self-start services
Centos 6
# service shellinaboxd start / / start the service
# service shellinaboxd stop / / stop the service
# service shellinaboxd restart / / restart the service
# chkconfig shellinaboxd on / / self-starting service
Centos 7
# systemctl start shellinaboxd.service
# systemctl stop shellinaboxd.service
# systemctl restart shellinaboxd.service
# systemctl enable shellinaboxd.service
Force shutdown of Shellinaboxd
Find the process pid of Shellinaboxd and kill it.
# ps-aux | grep shellinaboxd | grep-v grep | awk'{print $1}'
You can also add the-p parameter at startup to save the process pid to the specified file, read it and kill it when you need to close
4. Check the service status
# netstat-nap | grep shellinabox
Tcp 0 0 0.0.0 0 6175 0.0.0 0 V * LISTEN 118916/shellinaboxd
Https://192.168.3.160:6175/
Automatically disconnect if you don't log in for 60s by default
Login succeeded
Exit the web Shell terminal:
After reading the above, do you have any further understanding of how to use the Linux Shell Web terminal tool shellinabox? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.