Git Product home page Git Product logo

piping-ssh-web's Introduction

piping-ssh

SSH over HTTPS via Piping Server on browser.

https://piping-ssh.nwtgck.org

We often want to access applications on our remote machine. But some environments have NATs or difficulties with opening a port to the public and getting a static IP. There is a way to forward a port over HTTPS with high transparency. This project aims to provide an SSH client that works on the browser and is compatible with the highly transparent way.

SSH over pure HTTPS via Piping Server

On the SSH server side, you can simply run the following command.

curl -sSN https://ppng.io/aaa | nc localhost 22 | curl -sSNT - https://ppng.io/bbb

The command above consists only of curl and nc, which are widely used and trusted. These commands are likely to already be installed on your machine.

Security

  • SSH things are processed only in the browser without any server.
  • Go language (golang.org/x/crypto/ssh) and WebAssembly are used.
  • The connection between the browser and the SSH server are end-to-end encrypted.
  • The connection between the browser and Piping Server is also encrypted in transit with HTTPS.
  • The running command on the SSH server side is highly transparent, so you can easily understand what they are doing.

SSH key generation

You can generate SSH keys only in the browser without any server.

  • RSA 2048 bits
  • RSA 4096 bits
  • Ed25519
SSH key generation in browser

You can also manage keys generated by ssh-keygen command with or without a passphrase.

URL fragment parameters

You can store the configuration in the URL. All the parameters are in the URL fragment so they are never sent to the web server. piping-ssh-web with URL fragment parameters

e.g. https://piping-ssh.nwtgck.org/#?user=myuser&password=mypass&s_port=22&cs_path=aaa&sc_path=bbb

  • user: SSH user name
  • password: SSH user password
  • server: Piping Server URL
  • cs_path: Server-to-client path
  • sc_path: Client-to-server path
  • auto_connect: Connect automatically
  • s_port: SSH Server port for command hint
  • headers: HTTP headers to Piping Server
    • (e.g. [["X-MyExtra1", "myvalue1"], ["Content-Type", "application/myapp"]])

Requirement

This project requires Google Chrome 105 or higher for fetch() upload streaming feature. You can also use Chromium-based browsers.

Previous version using SSHy

This project used to highly based on SSHy before Go language and WebAssembly were used.
SSHy version: https://6453204af3b3fc3555e79371--piping-ssh.netlify.app

Acknowledgements

The idea of tunneling over Piping Server was proposed by @Cryolite in a Japanese post, https://qiita.com/Cryolite/items/ed8fa237dd8eab54ef2f. Thanks!

Self-hosting Piping Server

It is easy to use Replit and fork https://replit.com/@nwtgck/piping to host Piping Server for free. You can see https://github.com/nwtgck/piping-server/wiki/How-to-self-host-Piping-Server to get other ways.

References

piping-ssh-web's People

Contributors

dependabot[bot] avatar metabolix avatar nwtgck avatar samuelmarks avatar stuicey avatar whydoubt 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

piping-ssh-web's Issues

some keys not working

I managed to connect to a remote shell using https://piping-ssh.netlify.app (chrome browser on macOS 11.2.3, ubuntu 20.4 LTS remote server) but the following key presses aren't being registered

return
backspace
arrow keys

I'd love to get this working if possible, it's an amazing concept!

How to build code?

Because npm audit shows CVEs, I tried to upgrade package versions or switch packages, but found that the specified paths and folders couldn't be located.
repo: https://github.com/ParkerOu/piping-ssh-web

npm run serve

shows

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/ssh/connection.go b/ssh/connection.go
|index 8f345ee..7d7204b 100644
|--- a/ssh/connection.go
|+++ b/ssh/connection.go
--------------------------
File to patch:

Apparently, there is no ssh subdirectory and connection.go file under golang-crypto.
How should the project be initialized?

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.