GithubHelp home page GithubHelp logo

bluemaxs / webssh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamlee/webssh

0.0 0.0 0.0 794 KB

124 loc to learn how to implement webssh, support k8s and virtual machine ssh

HTML 40.72% JavaScript 59.28%

webssh's Introduction

WEBSSH

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

使用方式

针对于虚拟机的 webssh

# 1 启动 node
node main.js

# 打开本地文件 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"};
# 然后本地浏览器打开 index-vm.html

针对于k8s 的 webssh

# 1 启动 node
node main.js

# 打开本地文件 index.html
# 修改代码里配置信息
# https://github.com/Jamlee/webssh/blob/033491e4f17fc40794e84e369550d9f20f290af0/index.html#L11

let config = {msgId: "pod01", podName: "tiller-deploy-6d8dfbb696-z8g6l", namespace: "kube-system"};
# 然后本地浏览器打开 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

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.