AjaxTerm is a python web server offering a terminal emulator web application, which allows you to open a session on your server when the only way you can access it is by HTTP (for example, if a firewall prevents you from using SSH).

Downloading and running AjaxTerm

Download the latest version on the AjaxTerm website. Then uncompress the archive and just run the ajaxterm.py executable file.

wget http://antony.lesuisse.org/qweb/files/Ajaxterm-0.9.tar.gz
tar zxvf Ajaxterm-0.9.tar.gz
cd Ajaxterm-0.9
./ajaxterm.py

AjaxTerm listen for new connection at http://localhost:8022/.

Enabling secure remote access

If you want to allow remote access, the most secure way is to use the HTTP proxy feature of Apache, and SSL.

Install Apache2 web server, then enable the proxy and ssl modules :

sudo cp /etc/apache2/mods-available/proxy.* /etc/apache2/mods-enabled/
sudo cp /etc/apache2/mods-available/ssl.* /etc/apache2/mods-enabled/

Initialize SSL on Apache :

sudo apache2-ssl-certificate

Then configure your new host :

sudo vi /etc/apache2/sites-availables/002-AjaxTerm

In this file, write :

Listen 443
NameVirtualHost *:443

<VirtualHost *:443>
   ServerName localhost
   SSLEngine On
   SSLCertificateKeyFile ssl/apache.pem
   SSLCertificateFile ssl/apache.pem

   ProxyRequests Off
   <Proxy *>
      Order deny,allow
      Allow from all
   </Proxy>
   ProxyPass /ajaxterm/ http://localhost:8022/
   ProxyPassReverse /ajaxterm/ http://localhost:8022/
</VirtualHost>

Replace 'localhost' in 'ServerName localhost' with the hostname of your web server. Enable this host :

sudo cp /etc/apache2/sites-availables/002-AjaxTerm /etc/apache2/sites-enabled/

Then restart Apache 2 to check everything is ok. Youre web terminal emulator is now ready. You can access it on https://hostname/ajaxterm/.

Remember than ajaxterm.py must be running every time you want to use it.