python webssh

1、使用Docker部署WebSSH

docker run -d --name=webssh -p 8888:8888 --restart unless-stopped jumploop/webssh:latest
# -d:表示让容器在后台运行
# --name:为容器命名为 webssh
# -p:将容器内的8888端口映射到宿主机的8888端口
# --restart unless-stopped:确保容器在系统重启后自动启动
# jumploop/webssh:latest:指定使用最新版本的jumploop/webssh镜像

2、使用docker-compose部署,需创建一个docker-compose.yml文件,写入以下内容:

version: '3'
services:
  webssh:
    image: jumploop/webssh:latest
    container_name: webssh
    ports:
      - 8888:8888
    restart: always
# 启动WebSSH服务命令:docker compose up -d

参考链接:
      https://www.cnblogs.com/LyShark/p/16758172.html      # Flask框架运用SocketIO实现WebSSH
      https://www.cnblogs.com/brian-sun/p/18267084      # WebSSH
      https://pypi.org/project/webssh/
      https://gitcode.com/gh_mirrors/xt/xterm.js

posted @ 2025-03-18 16:38  風£飛  阅读(46)  评论(0)    收藏  举报