Giter Club home page Giter Club logo

ghoster's Introduction

drawing

GhoSSHter

Ghoster is a single instance SSH server written in NodeJS allowing you to forward your instances behind a firewall to the public.

It works by hosting the instance, and allowing others to forward their services with nothing but SSH installed.

For instance, suppose you host this project on ghoster_server.com, if a user wants to expose their local site at port 3000 they can do:

ssh user@ghoster_server.com -p 2222 -R 0:localhost:3000

They will get back a random port as a reply after entering the password:

Allocated port 1024 for remote forward to localhost:3000

You can now access the service publicly at ghoster_server.com:1024

It's a great alternative to ngrok.io.

Features

  • Easy to set up, works with Docker
  • No need to install anything on the user side (if you have a OS with SSH preinstalled, such as Linux or Mac)
  • Simpler than other implementations, both the SSH server and the forwarding server are implemented in a single app.
  • Easy to deploy, you can simply rename config.sample.js to config.js, set login credentials and spawn the Docker-container

How to set it up

Assumptions

We assume you have:

  • Knowledge of Git
  • Have docker and docker-compose installed
  • The author has Linux as OS, if you have a different operating system, you should replace the commands below with your system's implementation.
  • The standard config, except for the logins, give your more than enough ports to foward (128 different connections), should you want more or different ports, make sure you change those as well.

  1. Clone this repo
  2. Rename config.sample.js to config.js, change the login's and other config settings you want to change.
    • Note: If you change the port range in config.js, you also have to change docker-compose.yml!
  3. Run docker-compose up -d --build inside the repo directory
  4. Make sure your server has opened the ports that are being used by Ghoster, normally that is port 1024 to 2048.
  5. Run the SSH forwarding command on a client: ssh user@ghoster_server.com -p 2222 -R 0:localhost:3000 (in this sample, you forward a local service on port 3000)

ghoster's People

Contributors

peterwilli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mr-ghost001

ghoster's Issues

ssh: connect to host ghoster_server.com port 2222: Connection refused

Hi, I am unable to use this since I keep getting this error when I run ssh user@ghoster_server.com -p 2222 -R 0:localhost:3000 (of course with my data).

I have a CentOS 7 server in which I cloned this repo and changed the config.js properly.
Docker-compose did setup everything fine, but when I try to run the ssh command on my machine, I get that error.

Any ideas?

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.