Author: Santtu Lakkala <email@example.com>
Date: Mon, 2 Jan 2017 09:24:10 +0000
xterm.js + ssh2 + websocket-stream + browserify = webssh
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/posts/xterm-js-ssh2-websocket-stream-browserify-webssh.md b/posts/xterm-js-ssh2-websocket-stream-browserify-webssh.md
@@ -0,0 +1,16 @@
+# xterm.js + ssh2 + websocket-stream + browserify = webssh
+While pondering ideas for a website facelift, there was an idea to have a terminal for easy ssh access. However, none of the readily available options really suited my fancy; [wssh](https://github.com/aluzzardi/wssh) came close, but it was actually doing ssh on the server side, and throwing the raw data inside websockets.
+Fortunately [npm](https://npmjs.com/) is full of nice bits and pieces to build on, and [browserify](http://browserify.org/) makes it quite easy to use most of them in a browser too.
+ $ npm install xterm ssh2 websocket-stream browserify
+ $ `npm bin`/browserify webssh.js > bundle.js
+ $ websockify 8022 localhost:22
+ (You'll need npm and [websockify](https://pypi.python.org/pypi/websockify) for the above). Then launch the html file in your favorite browser, and login. Tune the addresses to your liking.
+There's also a [demo version](http://inz.fi/webssh/), just enter your websocket endpoint (for example ws://localhost:8022), username and password, and on you go.