LinuxShellWeb終端工具shellinabox怎么用-創(chuàng)新互聯(lián)

今天就跟大家聊聊有關(guān)Linux Shell Web終端工具shellinabox怎么用,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結(jié)了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),渦陽企業(yè)網(wǎng)站建設(shè),渦陽品牌網(wǎng)站建設(shè),網(wǎng)站定制,渦陽網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,渦陽網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

@font-face{ font-family:"Times New Roman"; } @font-face{ font-family:"宋體"; } @font-face{ font-family:"微軟雅黑"; } @font-face{ font-family:"Arial"; } @font-face{ font-family:"Courier New"; } @font-face{ font-family:"monospace"; } p.MsoNormal{ mso-style-name:正文; mso-style-parent:""; margin:0pt; margin-bottom:.0001pt; mso-pagination:none; font-family:微軟雅黑; mso-bidi-font-family:'Times New Roman'; font-size:10.5000pt; } span.10{ font-family:微軟雅黑; } span.15{ font-family:微軟雅黑; color:rgb(5,99,193); 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超級(jí)終端工具shellinabox

Shell是Linux內(nèi)核應(yīng)用程序,是指“為使用者提供操作界面”的軟件,也是命令解析器,它類似于Windows操作系統(tǒng)DOS下的cmd.exe應(yīng)用程序。它接收用戶命令,然后調(diào)用相應(yīng)的應(yīng)用程序,用戶一般管理Linux服務(wù)器都是習(xí)慣用putty、Xshell、SecureCRT、secure shell等客戶端端工具,但是使用這些客戶端都是需要在本地安裝后才能使用,如果換其它電腦也是需要重新安裝,這樣非常使用起來非常麻煩,所以,我們今天就來介紹一塊非常方便的shell客戶端工具,使用系統(tǒng)自帶的瀏覽器來管理Linux服務(wù)終端,是一款能隨時(shí)在任何終端上面管理,這一款運(yùn)行在linux下面的工具 shellinabox,只需要在Linux服務(wù)器上面安裝并配置好shellinabox。

shellinabox是由Markus Gutschke創(chuàng)建的基于Web的終端模擬器。它具有內(nèi)置的Shell Web服務(wù)端,在指定端口上作為基于Web的SSH客戶端運(yùn)行,并提示您使用任何支持AJAX/JavaScript和CSS的瀏覽器遠(yuǎn)程訪問和控制Linux Server SSH Shell,而無需任何其他瀏覽器插件,使用非常方便,不過安裝和配置是需要有點(diǎn)點(diǎn)Linux基礎(chǔ),如果覺得自己完全不懂Linux,可以建議去購買《Linux就該這么學(xué)》這本教程,非常適合初學(xué)者入門,或者去此教程的官網(wǎng)查看詳細(xì)的資料,直接在百度輸入此書名就可以直接進(jìn)入官網(wǎng)。

shellinbox是一款在Linux服務(wù)器下有一個(gè)內(nèi)建的web server作為基本的web ssh client,允許你通過指定的端口訪問linux服務(wù)器的ssh shell,只要你的瀏覽器支持AJAX/JS/CSS就可以訪問,不過現(xiàn)在主流的操作系統(tǒng)自帶的瀏覽器都支持,shellinabox是一款開源的輕量級(jí)軟件,在安裝shellinabox之前要確定Linux服務(wù)端是否安裝了openssl庫;debian和ubuntu官方還提供有deb安裝包,而centos也有rpm包,也可以通過yum源安裝,安裝及配置也比較簡單,下面我們來詳細(xì)的安裝和配置shellinabox。

一、在RHEL、 CentOS系統(tǒng)上面安裝及配置步驟如下

# 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     

(1/6): extras/7/x86_64/primary_db                                                               | 156 kB  00:00:00     

(2/6): base/7/x86_64/group_gz                                                                   | 166 kB  00:00:01     

(3/6): epel/x86_64/updateinfo                                                                   | 940 kB  00:00:08     

(4/6): updates/7/x86_64/primary_db                                                              | 1.3 MB  00:00:10     

(5/6): epel/x86_64/primary                                                                      | 3.6 MB  00:00:21     

(6/6): base/7/x86_64/primary_db                                                                 | 6.0 MB  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 0: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                    x86_64                  2.20-5.el7                         epel                  136 k

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

(1/4): openssl-1.0.2k-16.el7.x86_64.rpm                                                         | 493 kB  00:00:01     

(2/4): shellinabox-2.20-5.el7.x86_64.rpm                                                        | 136 kB  00:00:01     

(3/4): openssl-devel-1.0.2k-16.el7.x86_64.rpm                                                   | 1.5 MB  00:00:05     

(4/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/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/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 0: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!

二、配置shellinaboxd

192.168.3.160是SSH服務(wù)器IP地址,

# 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協(xié)議)

#OPTS="-t -s /:SSH:192.168.3.160" #(http協(xié)議) 

# if you want to restrict access to shellinaboxd from localhost only

#下面配置是僅主機(jī)訪問,其它主機(jī)不能訪問

#OPTS="-s /:SSH:192.168.3.160 --localhost-only"

shellinaboxd默認(rèn)端口是:4200,我這里修改為6175。

Shellinaboxd常用參數(shù)使用的幫助手冊(cè)

# 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

三、啟動(dòng)、停止、自啟動(dòng)服務(wù)

Centos 6

# service shellinaboxd start    //啟動(dòng)服務(wù)

# service shellinaboxd stop    //停止服務(wù)

# service shellinaboxd restart   //重啟服務(wù)

# chkconfig shellinaboxd on    //自啟服務(wù)

Centos 7

# systemctl start shellinaboxd.service

# systemctl stop shellinaboxd.service

# systemctl restart shellinaboxd.service

# systemctl enable shellinaboxd.service

強(qiáng)制關(guān)閉 Shellinaboxd

查找到 Shellinaboxd 的進(jìn)程 pid ,kill 即可

# ps -aux|grep shellinaboxd | grep -v grep | awk ‘{print $1}’

也可在啟動(dòng)時(shí)加上 -p 參數(shù),將進(jìn)程 pid 保存到指定的文件中,需要關(guān)閉時(shí)讀取它并進(jìn)行 kill

四、查看服務(wù)狀態(tài)

# netstat -nap | grep shellinabox

tcp      0      0 0.0.0.0:6175    0.0.0.0:*     LISTEN     118916/shellinaboxd

https://192.168.3.160:6175/

默認(rèn)60s不登錄自動(dòng)斷開

登錄成功

退出web Shell終端:

看完上述內(nèi)容,你們對(duì)Linux Shell Web終端工具shellinabox怎么用有進(jìn)一步的了解嗎?如果還想了解更多知識(shí)或者相關(guān)內(nèi)容,請(qǐng)關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道,感謝大家的支持。

當(dāng)前標(biāo)題:LinuxShellWeb終端工具shellinabox怎么用-創(chuàng)新互聯(lián)
網(wǎng)站URL:http://muchs.cn/article38/dcjpsp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供移動(dòng)網(wǎng)站建設(shè)、建站公司服務(wù)器托管、企業(yè)網(wǎng)站制作、網(wǎng)頁設(shè)計(jì)公司、營銷型網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司