云原生之部署webssh工具
【摘要】 云原生之部署webssh工具
一、检查系统版本
[root@server001 webssh]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
二、检查docker版本
[root@server001 webssh]# docker version
Client: Docker Engine - Community
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:05:12 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:03:33 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[root@server001 webssh]#
三、下载webssh镜像
[root@server001 webssh]# docker pull snsyzb/webssh
Using default tag: latest
latest: Pulling from snsyzb/webssh
124c757242f8: Pull complete
9d866f8bde2a: Pull complete
fa3f2f277e67: Pull complete
398d32b153e8: Pull complete
afde35469481: Pull complete
d68c56e3e37c: Pull complete
d563634ee4b5: Pull complete
Digest: sha256:52fec21d4e4489d4f0557802b9c989cc72119a8bca032a7e5582a999cd5a875f
Status: Downloaded newer image for snsyzb/webssh:latest
docker.io/snsyzb/webssh:latest
四、部署webssh服务
1.运行webssh容器
docker run -d --name webssh001 -p 10000:10000 snsyzb/webssh wssh --address=0.0.0.0 --port=10000
2.查看webssh容器状态
[root@server001 webssh]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
33054eaff840 snsyzb/webssh "wssh --address=0.0.…" 30 seconds ago Up 28 seconds 8080/tcp, 0.0.0.0:10000->10000/tcp, :::10000->10000/tcp webssh001
3.查看容器运行日志
[root@server001 webssh]# docker logs webssh001
[I 221118 12:00:26 settings:69] WarningPolicy
[I 221118 12:00:26 main:32] Listening on 0.0.0.0:10000
五、访问webssh
六、ssh连接服务器
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)