怎么使用Docker部署webssh工具sshwifty
这篇文章主要讲解了“怎么使用Docker部署webssh工具sshwifty”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么使用Docker部署webssh工具sshwifty”吧!
一、sshwifty介绍1.sshwifty简介
sshwifty是一款Web SSH & Telnet(WebSSH & WebTelnet 客户端工具。
2.shwifty 特点
shwifty 是为 Web 设计的 SSH 和 Telnet 连接器。它可以部署在您的计算机或服务器上,为任何兼容(标准)的网络浏览器提供 SSH 和 Telnet 访问接口。
二、检查本地docker环境1.检查docker版本[root@jeven~]#dockerversionClient:DockerEngine-CommunityVersion:20.10.21APIversion:1.41Goversion:go1.18.7Gitcommit:baeda1fBuilt:TueOct2518:04:242022OS/Arch:linux/amd64Context:defaultExperimental:trueServer:DockerEngine-CommunityEngine:Version:20.10.21APIversion:1.41(minimumversion1.12)Goversion:go1.18.7Gitcommit:3056208Built:TueOct2518:02:382022OS/Arch:linux/amd64Experimental:falsecontainerd:Version:1.6.12GitCommit:a05d175400b1145e5e6a735a6710579d181e7fb0runc:Version:1.1.4GitCommit:v1.1.4-0-g5fd4c4ddocker-init:Version:0.19.0GitCommit:de40ad02.检查docker状态[root@jeven~]#systemctlstatusdocker●docker.service-DockerApplicationContainerEngineLoaded:loaded(/usr/lib/systemd/system/docker.service;enabled;vendorpreset:disabled)Active:active(running)sinceSat2022-12-1002:07:56CST;1day16hagoDocs:https://docs.docker.comMainPID:3200(dockerd)Tasks:51Memory:2.2GCGroup:/system.slice/docker.service├─3200/usr/bin/dockerd-Hfd://--containerd=/run/containerd/containerd.sock├─10894/usr/bin/docker-proxy-prototcp-host-ip0.0.0.0-host-port8777-container-ip192.168.144.3-container-port80├─10900/usr/bin/docker-proxy-prototcp-host-ip::-host-port8777-container-ip192.168.144.3-container-port80├─47983/usr/bin/docker-proxy-prototcp-host-ip0.0.0.0-host-port8030-container-ip192.168.160.4-container-port8002├─47989/usr/bin/docker-proxy-prototcp-host-ip::-host-port8030-container-ip192.168.160.4-container-port8002├─79289/usr/bin/docker-proxy-prototcp-host-ip0.0.0.0-host-port8182-container-ip172.17.0.2-container-port8182└─79295/usr/bin/docker-proxy-prototcp-host-ip::-host-port8182-container-ip172.17.0.2-container-port8182Dec1017:59:26jevendockerd[3200]:time="2022-12-10T17:59:26.025354968+08:00"level=infomsg="ignoringevent"container=f12196399ec79af5...skDelete"Dec1017:59:29jevendockerd[3200]:time="2022-12-10T17:59:29.686116328+08:00"level=infomsg="ignoringevent"container=f12196399ec79af5...skDelete"Dec1018:23:34jevendockerd[3200]:time="2022-12-10T18:23:34.990641014+08:00"level=infomsg="ignoringevent"container=c663d02e84709140...skDelete"Dec1018:26:49jevendockerd[3200]:time="2022-12-10T18:26:49.278375069+08:00"level=infomsg="ignoringevent"container=c261a231fd3a667e...skDelete"Dec1018:30:06jevendockerd[3200]:time="2022-12-10T18:30:06.474584540+08:00"level=infomsg="ignoringevent"container=c030677ef4c374ce...skDelete"Dec1018:56:18jevendockerd[3200]:time="2022-12-10T18:56:18.697839686+08:00"level=infomsg="ignoringevent"container=1dee36827375e093...skDelete"Dec1021:38:37jevendockerd[3200]:time="2022-12-10T21:38:37.225136574+08:00"level=infomsg="ignoringevent"container=9eb379c6b627f271...skDelete"Dec1111:25:12jevendockerd[3200]:time="2022-12-11T11:25:12.020544314+08:00"level=infomsg="Attemptingnextendpointforpullafterer...erError"Dec1111:39:16jevendockerd[3200]:time="2022-12-11T11:39:16.374445047+08:00"level=infomsg="Containerfailedtoexitwithin10sofsig...ee64e0feeDec1111:39:16jevendockerd[3200]:time="2022-12-11T11:39:16.417759049+08:00"level=infomsg="ignoringevent"container=a8ec136f38e4cfa8...skDelete"Hint:Somelineswereellipsized,use-ltoshowinfull.三、下载sshwifty镜像[root@jeven~]#dockerpullniruix/sshwifty:latestlatest:Pullingfromniruix/sshwifty59bf1c3509f3:Alreadyexistseb8f919181be:Pullcomplete21facffd2b84:Pullcompleteea1365dbf4a0:Pullcompletelatest:Pullingfromniruix/sshwifty213ec9aee27d:Alreadyexistsdb074b00f828:Pullcompleteaf1b674602a2:Pullcomplete5f786aa6e56f:PullcompleteDigest:sha256:410a48bbce146d01ca7e5f20ff67e55dfdab5afbe46ae41ad696d659c6856670Status:Downloadednewerimageforniruix/sshwifty:latestdocker.io/niruix/sshwifty:latest四、服务器生成凭证文件[root@jeven~]#opensslreq-newkeyrsa:4096-nodes-keyoutdomain.key-x509-days90-outdomain.crtGeneratinga4096bitRSAprivatekey...........................................................................................................++...++writingnewprivatekeyto'domain.key'-----Youareabouttobeaskedtoenterinformationthatwillbeincorporatedintoyourcertificaterequest.WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.TherearequiteafewfieldsbutyoucanleavesomeblankForsomefieldstherewillbeadefaultvalue,Ifyouenter'.',thefieldwillbeleftblank.-----CountryName(2lettercode)[XX]:StateorProvinceName(fullname)[]:LocalityName(eg,city)[DefaultCity]:OrganizationName(eg,company)[DefaultCompanyLtd]:OrganizationalUnitName(eg,section)[]:CommonName(eg,yournameoryourserver'shostname)[]:EmailAddress[]:五、创建sshwifty容器1.创建部署目录mkdir-p/data/sshwifty2.创建sshwifty容器dockerrun--detach\--restartalways\--publish8182:8182\--envSSHWIFTY_DOCKER_TLSCERT="$(catdomain.crt)"\--envSSHWIFTY_DOCKER_TLSCERTKEY="$(catdomain.key)"\--namesshwifty\niruix/sshwifty:latest3.查看sshwifty容器状态[root@jeven~]#dockerpsCONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMESd03202a5cce7niruix/sshwifty:latest"/sshwifty.sh"8hoursagoUp8hours0.0.0.0:8182->8182/tcp,:::8182->8182/tcpsshwifty六、访问sshwifty首页七、sshwifty的基本使用1.进入连接选项界面2.选择ssh连接
填写服务器IP地址等信息,选择认证方式
3.认证信息配置4.远程ssh连接服务器5.查看连接延迟状态
感谢各位的阅读,以上就是“怎么使用Docker部署webssh工具sshwifty”的内容了,经过本文的学习后,相信大家对怎么使用Docker部署webssh工具sshwifty这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!