Giter VIP home page Giter VIP logo

html5-remote-ssh's Introduction

HTML5 Remote SSH

HTML5 based Remote SSH with Python backend

Table of Content

Requirements

  • Python 2.7 (Tested), may work with other version of Python
  • HTML5 browser supporting WebSocket and JSON(you can replace JSON with other library if you donot have support of it)

Python setup

Paramiko

Paramiko is a python based SSH client with good documentation. You can easily install it using following command

pip install paramiko

WebsocketServer

I wanted a simplest of the WebSocket server so I selected this. As state here about the installation, you can easily install it by:

  1. pip install git+https://github.com/Pithikos/python-websocket-server (latest code)
  2. pip install websocket-server (might not be up-to-date)

Starting the server

python python/shel.py

HTML Setup

You can just copy shell.html and edit few things up depending on your requirements. The main connection line looks like below and can be edited to set the host/username/password you required

mainSocket.send(JSON.stringify({action: 'connect', host:"localhost",port:22,username:'user',password:'password'}));

Parameters

  • action: 'connect' (default to connect for connection)
  • host: the host you would like to connect to. localhost, www.google.com, 192.168.1.5(this will connect to the server's local network and not your own)
  • port: default is 22, you can send the port you want
  • username: the username you want to connect to
  • password: the password you connect to server for the username

Please feel free to modifiy code on you end, the application still needs upgrade since I only required few basics for my personal project and I wanted to share the code.

html5-remote-ssh's People

Contributors

abupoudel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.