«

Docker部署ssh连接工具webssh2

疯狂摆烂 发布于 阅读:1287 docker部署


一、检查系统版本

[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]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-11-06 06:02:26 CST; 1 weeks 5 days ago
     Docs: https://docs.docker.com
 Main PID: 9869 (dockerd)
    Tasks: 55
   Memory: 3.4G
   CGroup: /system.slice/docker.service

三、下载webssh2镜像

[root@server001 webssh]# docker pull dockerhub.icu/lihaixin/webssh2:ssh
Unable to find image 'lihaixin/webssh2:ssh' locally
ssh: Pulling from lihaixin/webssh2
ca3cd42a7c95: Pull complete 
71cb5a638638: Pull complete 
2033bc407fc5: Pull complete 
Digest: sha256:4055605cdcbcae6a76326962a0413d254beee60155d72f373f21aac61f96e09e
Status: Downloaded newer image for lihaixin/webssh2:ssh

四、创建webssh2容器

docker run -d \
-p 5032:5032 \
--restart always \
--name webssh \
lihaixin/webssh2:ssh

五、访问webssh2
http://192.168.3.166:5032,进入webssh2首页

  1. 远程连接服务器

收到1条评论
avatar
空空 2024-07-19 11:57
牛逼哦  部署成功!
回复