Google Plus

Ajaxterm- A web based terminal that help you use ssh from a web browser

Written by Mel Kham on . Posted in Linux tutorials

Ajaxterm is a web based terminal. It was totally inspired and works almost  on all OS. Ajaxterm written in python (and some AJAX javascript for client side) and depends only on python2.3 or better. Ajaxterm is ”’very simple to install”’ on Linux, MacOS X, FreeBSD, Solaris, cygwin and any Unix that runs python2.3.

Lets  show  the  easy  install on  debian based  systems (Ubuntu, Linuxmint…)  In my case i used Ubuntu 10.10

Installation of Ajaxterm in debian based systems:

1- Open terminal and type the following command:

sudo apt-get install ajaxterm

2- Now you  have  to  edit  ssh_config and  enable   PasswordAuthentication then restart ssh.

sudo sed -i s:PasswordAuthentication.*:PasswordAuthentication yes: /etc/ssh/sshd_config
sudo service ssh restart

 

To test this if is working, open your browser and type :

http://localhost:8022


Install Ajaxterm in other linux distributions:

To install Ajaxterm from source, issue the following commands

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

Then point your browser to this URL : http://localhost:8022/

How  to access your  sshd  server  from  outside the  LAN  network using Ajaxterm?

- Make  a  clone  copy  from default  to ssl website  like 

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl

- Enable some  modules  for  proxy and  ssl

sudo a2enmod proxy_http
sudo a2enmod ssl
sudo a2ensite default-ssl

- Create  Ajaxterm  directory

sudo mkdir /srv/ajaxterm

- Create a username and password to protect the webpage of Ajaxterm:

sudo htpasswd -bc /srv/ajaxterm/.htpasswd pirat9 xxxxxxxx   

Now edit   the  virtualhost on  website

/etc/apache2/sites-enabled/default-ssl

and  add these lines

ProxyRequests Off

                AuthUserFile /srv/ajaxterm/.htpasswd
                AuthName EnterPassword
                AuthType Basic
                require valid-user

                Order Deny,allow
                Allow from all

        ProxyPass / http://localhost:8022/
        ProxyPassReverse / http://localhost:8022/

Now restart apache and  dont  forget  to open  port 443  on your  router .

{loadposition user9}

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • Cos Costa

    Couldn’t get it running :-(

    Could you be a little more specific where in default-ssl to paste those line
    —-
    ProxyRequests Off
    ….
    —–
    exactly ?

    Also I was wondering why you make a clone of the default and never use it.

    —-
    sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
    —-

    after that you just work with default-ssl thou?

    I’d love to get this running ;)

  • bofiran

    Using "ProxyRequests off" means the apache is going to be a reverse proxy

  • bofiran

    for cloning defaults to SSL or others . i think is not required, but this still working method.

  • Usp71084

    Nice..exactly what I was searching !

  • kitez

    nice guide…

    btw, i got an error “AuthUserFile not allowed here” when i tried to add
    ProxyRequests Off

    AuthUserFile /srv/ajaxterm/.htpasswd
    AuthName EnterPassword
    AuthType Basic
    require valid-user

    Order Deny,allow
    Allow from all

    ProxyPass / http://localhost:8022/
    ProxyPassReverse / http://localhost:8022/

    if i not add this line, can i still access the website just by open port 8022 on my router?

    thank you for your help

  • palo

    man….I’ve been searching for something like this for a LONG time and my teacher’s been hard on me about it….thank you so much for putting your effort into this

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Nova

|

I wonder if there is a way to create your own themes.

Red Adaya

|

Thank you! This worked for me!!!

SK

|

Andrew look into your httpd.conf file at line no 350. There might be a syntax error.

andrew

|

hello I have this error

[root@cloud html]# /etc/init.d/httpd restart

then this appears

Starting httpd: httpd: Syntax error on line 350 of /etc/httpd/conf/httpd.conf: without matching section.

plz tell how to fix this.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .