After reading a Tweet from Matt Cutts about being able to SSH from the iPhone (and the web in general), I had to give it a try. I am always looking for better ways to be able to check on systems when necessary. I have iPhone apps for SSHing around if I need as well, but like with any “new” tool, I have to try it out to see if it serves a purpose or makes my admin life easier in any way.
First go check out the Google Code repository for Web Shell. Webshell is written in Python and is based on Ajaxterm. All that’s required is SSL And Python 2.3 or greater. It works on any browser that has Javascript and can make use of AJAX.
The way Web Shell works is you start it up on a server and then can use a web browser to access only that machine over SSH. The works best if you have a gateway server to a network and use a single point of entry to access the rest of the servers. Web Shell runs on HTTPS on port 8022. Reading the README will lead you through the same set of instructions I used below. Once installed, we connect by using a web browser: https://server.com:8022/
1 2 3 4 5 6 7 8 9 | elubow@server:/home/web/webshell.lubow.org-8022$ ./make_certificate.sh Generating a 1024 bit RSA private key ...............................................................++++++ ...........................................++++++ writing new private key to 'webshell.pem' ----- elubow@server:/home/web/webshell.lubow.org-8022$ ./webshell.py The python SSL extensions seem to be not installed. You can run WebShell without SSL encryption with the --ssl-disable command line switch. |
You’ll notice that while it is possible to run the terminal without SSL, it is just not in our best interest. So let’s go ahead and install it. I use Debian on my servers. So in my case, it’s as simple as:
1 2 3 4 5 6 7 | server:~# apt-get install python-pyopenssl python-openssl Get:1 http://ftp.de.debian.org lenny/main python-openssl 0.7-2 [88.9kB] Get:2 http://ftp.de.debian.org lenny/main python-pyopenssl 0.7-2 [9.0kB] Unpacking python-openssl (from .../python-openssl_0.7-2_i386.deb) ... Setting up python-openssl (0.7-2) ... Setting up python-pyopenssl (0.7-2) ... Processing triggers for python-support ... |
Then we run the server:
1 2 | elubow@server:/home/web/ssh.lubow.org-8022$ ./webshell.py WebShell (https) at 0.0.0.0, port 8022 |
I’ve included a screenshot from my iPhone below. The background is interchangeable with any other transparent background image. If you’re in need of a quick SSH or someone else’s smart phone has service and yours doesn’t with your fancy SSH programs, then this is definitely a cool and viable alternative.