Code Monkey home page Code Monkey logo

shellintheghost's Introduction

Shell in the Ghost

This is a package to implement remote shells over BOSSWAVE.

The conn subpackage implements Go's net.Conn interface over BOSSWAVE, so that can be used for other projects.

Install

$ go get github.com/gtfierro/shellintheghost
$ go install github.com/gtfierro/shellintheghost

Usage

Requires a server and a client.

Server

You need a base URI of the service and a set of terminals names. Each terminal corresponds to a single instance of the shell, so if you need to support multiple concurrent users, then it is a good idea to create separate terminals.

shellintheghost server -u scratch.ns/terminals -t gabe

This will create a terminal at scratch.ns/terminals/s.shell/_/i.term/slot/gabe with corresponding output at scratch.ns/terminals/s.shell/_/i.term/signal/gabe. Additional terminals can be created with more instances of the -t flag.

Servers can expose whatever shell they want. The default is /bin/bash, but using the -s flag you can specify /usr/bin/python or which supervisorctl or whatever you want.

Client

shellintheghost client -u scratch.ns/terminals -t gabe

Will connect to the server -- the client handles expanding the URI out w/ the service/interface names.

Gotchas

You should press enter at least once when starting so that you can see your prompt, else the server might publish it and it won't show up on your screen. The shell is still accepting input though.

The current version does not account for the size of your client's terminal window. Most things work, but this makes using vim and byobu and similar tools difficult. You can use stty to inform the terminal of the size you want

# for a perfectly square terminal window
# type these in after logging in
$ stty rows 100
$ stty cols 100
$ # verify the size
$ stty size
100 100

Exit with Ctl-D or exit or whatever you usually use.

shellintheghost's People

Contributors

gtfierro avatar

Watchers

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