GithubHelp home page GithubHelp logo

webssh's Introduction

WEBSSH

124 行代码完成3种简易的 webssh, 支持 k8s 和 vm ssh,用于理解实现webssh原理。我们也可以基于该原理开发 Paas 平台功能。

使用方式

针对于虚拟机的 webssh

# 1 启动 node
node main.js

# 2 打开本地文件 index-vm.html
# 修改代码里配置信息
# https://github.com/Jamlee/webssh/blob/033491e4f17fc40794e84e369550d9f20f290af0/index.html#L11
let config = {msgId: "server01", ip: "200.200.200.180", username: "root", password: "YOUR PASSWORD"};

# 3 然后本地浏览器打开 index-vm.html

针对于k8s 的 webssh

# 1 启动 node
node main.js

# 2 打开本地文件 index-kube.html
# 修改代码里配置信息
# https://github.com/Jamlee/webssh/blob/033491e4f17fc40794e84e369550d9f20f290af0/index.html#L11
let config = {msgId: "pod01", podName: "tiller-deploy-6d8dfbb696-z8g6l", namespace: "kube-system"};

# 3 然后本地浏览器打开 index-kube.html

类似的:https://github.com/Jamlee/webssh/blob/master/index-kube-v2.html#L18 也是一样修改和访问,我们这个方案不依赖 kubectl。

效果图

VM 的 webssh
image

k8s 中 pod 的 webssh (依赖 kubectl)
image

k8s 中 pod 的 webssh(依赖 node k8s client)
image

其他类似项目

基于 Node
https://github.com/samejack/web-k8s-exec
https://github.com/kubernetes-ui/container-terminal

基于 Python
https://github.com/xsank/webssh
https://github.com/huashengdun/webssh

基于 Golang
https://github.com/shibingli/webconsole

webssh's People

Contributors

jamlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

webssh's Issues

[DepShield] (CVSS 7.5) Vulnerability due to usage of express:4.17.1

Vulnerabilities

DepShield reports that this application's usage of express:4.17.1 results in the following vulnerability(s):

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of debug:2.6.9

Vulnerabilities

DepShield reports that this application's usage of debug:2.6.9 results in the following vulnerability(s):


Occurrences

debug:2.6.9 is a transitive dependency introduced by the following direct dependency(s):

express:4.17.1
        └─ body-parser:1.19.0
              └─ debug:2.6.9
        └─ debug:2.6.9
        └─ finalhandler:1.1.2
              └─ debug:2.6.9
        └─ send:0.17.1
              └─ debug:2.6.9

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.