A few weeks ago I started http://sshwizard.com as weekend project. It has been an emotional rollercoaster, I’ve learned a lot and I want to share it with you.
The project started while I was working full-time during my summer holidays. My goal was to create a web-based ssh-client, including a reverse tunnel for registered users. I used just a couple of minutes to break down the project into modules. My first sketch seemed simple and obvious: Using openssh and shifting input via websocket in and out, while displaying data in a simple div.
Although I had almost non webprogramming experience I thought it would be a matter of days till the product was finished. It seemed like a waste of time to do extensive research or further planning. So I started to code right away. I vastly underestimated the amount of time it would take to build a useable minimum viable product.
First up I had to choose a framework. Django seemed easy to use, it is written in python and therefore made it easy to interact with the os and the commandline. Two hours later I proudly had a webpage that showed the output of a system call. After that it got a bit harder. Just using pipes to interact with openssh just didn’t work. Openssh insisted on getting passwords for the connections via a real terminal. After wasting hours of ugly workaround attempts and realising that managing buffer-files would be hard and ugly too I started to search for alternative clients. Some more hours passed and I finally found paramiko, which is written in python so file buffers wouldn’t be necessary. Paramiko worked fine and the project jumped a big leap ahead.
Next up was handling websocket connections. I already imagined handling thousands of concurrent connections, and thought I had to use the most efficient server I could find. Some research brought me to tornado-webserver, and wow again it was written in python. Integrating with Django was a piece of cake. The product was almost building itself.
I started a test and immediately recognized I missed a whole big module. A terminal emulator. Again research began and gladly open source helped me out. Christopher Jeffreys terminal emulator was exactly what I needed (https://github.com/chjj/). A few modifications and I was able to fire it up and … It worked! I was really proud sticking together the product in almost no time and I had no clue most of the work was still to do.
Dieser Beitrag wurde unter Uncategorized veröffentlicht. Setze ein Lesezeichen auf den Permalink.