个人工具

“UbuntuHelp:AjaxTerm”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/AjaxTerm}} {{Languages|php5}} === Overview === Ajaxterm is a web based terminal. It was totally inspired and works almost exactly like [http://an...)
 
第20行: 第20行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install ajaxterm
 
sudo apt-get install ajaxterm
</nowiki></code>
+
</nowiki></pre>
  
 
Once it has downloaded and installed the apt files you can start ajaxterm with the command;
 
Once it has downloaded and installed the apt files you can start ajaxterm with the command;
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/ajaxterm start
 
sudo /etc/init.d/ajaxterm start
</nowiki></code>
+
</nowiki></pre>
  
 
With some peoples computers we start to get errors due to their ssh config.. so you will need to edit your ssh_config
 
With some peoples computers we start to get errors due to their ssh config.. so you will need to edit your ssh_config
第31行: 第31行:
 
sudo nano -w /etc/ssh/ssh_config
 
sudo nano -w /etc/ssh/ssh_config
 
//uncomment: PasswordAuthentication yes
 
//uncomment: PasswordAuthentication yes
</nowiki></code>
+
</nowiki></pre>
  
 
||<tablestyle="left; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">[http://elitelinux.org/andrewb/ajaxterm.png]||
 
||<tablestyle="left; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">[http://elitelinux.org/andrewb/ajaxterm.png]||
第45行: 第45行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install apache2 libapache-mod-ssl
 
sudo apt-get install apache2 libapache-mod-ssl
</nowiki></code>
+
</nowiki></pre>
 
Once you have set up your apache server in a way that you like it, we will make an SSL certificate to keep the system a bit safer. Use the command below and answer all the questions as best as possible.
 
Once you have set up your apache server in a way that you like it, we will make an SSL certificate to keep the system a bit safer. Use the command below and answer all the questions as best as possible.
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apache2-ssl-certificate
 
sudo apache2-ssl-certificate
</nowiki></code>
+
</nowiki></pre>
 
To now enable SSL use <code><nowiki>a2enmod ssl</nowiki></code>
 
To now enable SSL use <code><nowiki>a2enmod ssl</nowiki></code>
 
Now copy [then symlink] the SSL config from the Available sites to the Enabled sites
 
Now copy [then symlink] the SSL config from the Available sites to the Enabled sites
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
 
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
</nowiki></code>
+
</nowiki></pre>
  
 
Make sure all the modules for proxy have been made available;
 
Make sure all the modules for proxy have been made available;
第61行: 第61行:
 
sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load
 
sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load
 
sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load
 
sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load
</nowiki></code>
+
</nowiki></pre>
  
 
It is time to decide one a htaccess password and username, remember and make this password strong.
 
It is time to decide one a htaccess password and username, remember and make this password strong.
第67行: 第67行:
 
sudo mkdir /srv/ajaxterm
 
sudo mkdir /srv/ajaxterm
 
sudo htpasswd -bc /srv/ajaxterm/.htpasswd [user] [pass]
 
sudo htpasswd -bc /srv/ajaxterm/.htpasswd [user] [pass]
</nowiki></code>
+
</nowiki></pre>
  
  
第73行: 第73行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo nano -w /etc/apache2/sites-enabled/000-default
 
sudo nano -w /etc/apache2/sites-enabled/000-default
</nowiki></code>
+
</nowiki></pre>
 
Remove the line; <code><nowiki>NameVirtualHost *</nowiki></code>
 
Remove the line; <code><nowiki>NameVirtualHost *</nowiki></code>
 
and edit the first Vhost to include the port 80; <code><nowiki><VirtualHost *></nowiki></code> change to <code><nowiki><VirtualHost *:80></nowiki></code>.
 
and edit the first Vhost to include the port 80; <code><nowiki><VirtualHost *></nowiki></code> change to <code><nowiki><VirtualHost *:80></nowiki></code>.
第99行: 第99行:
 
         ProxyPassReverse / http://localhost:8022/
 
         ProxyPassReverse / http://localhost:8022/
 
</VirtualHost>
 
</VirtualHost>
</nowiki></code>
+
</nowiki></pre>
  
 
Restart apache2 <code><nowiki>sudo /etc/init.d/apache2 restart</nowiki></code> open your firewall port 443 and try to browse to [https://yourhost.foo] where yourhost.foo is either your IP adress or your hostname/web address.
 
Restart apache2 <code><nowiki>sudo /etc/init.d/apache2 restart</nowiki></code> open your firewall port 443 and try to browse to [https://yourhost.foo] where yourhost.foo is either your IP adress or your hostname/web address.

2007年5月13日 (日) 12:36的版本



Overview

Ajaxterm is a web based terminal. It was totally inspired and works almost exactly like Anyterm except it's much easier to install.

  • 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.
  • Ajaxterm was written by Antony Lesuisse (email: al AT udev.org), License Public Domain.


Please note; this guide currently only works on Ubuntu version 6.10 aka Edgy Eft. I will add 6.06 information soon.

Installation and Setup

Simply install the ajaxterm package.

sudo apt-get install ajaxterm

Once it has downloaded and installed the apt files you can start ajaxterm with the command;

sudo /etc/init.d/ajaxterm start

With some peoples computers we start to get errors due to their ssh config.. so you will need to edit your ssh_config

 
sudo nano -w /etc/ssh/ssh_config
//uncomment: PasswordAuthentication yes

||<tablestyle="left; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">[1]|| The default location for the config file is located /etc/default/ajaxterm . This may be edited to change the default port [Default=8022]

Remember and open up port 8022 if you are running a firewall, and that is it set up on your local machine. You can access it with [2] . How ever check out below for how to access it from an external machine.


External Access

You can access your computer externally, how ever this is unsafe and may compromise your computers safety. Below is a fairly safe way of using Apache2 and SSL. First off we need to get apache2 and ssl mod

sudo apt-get install apache2 libapache-mod-ssl

Once you have set up your apache server in a way that you like it, we will make an SSL certificate to keep the system a bit safer. Use the command below and answer all the questions as best as possible.

sudo apache2-ssl-certificate

To now enable SSL use a2enmod ssl Now copy [then symlink] the SSL config from the Available sites to the Enabled sites

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

Make sure all the modules for proxy have been made available;

sudo ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf 
sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load
sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load

It is time to decide one a htaccess password and username, remember and make this password strong.

 
sudo mkdir /srv/ajaxterm
sudo htpasswd -bc /srv/ajaxterm/.htpasswd [user] [pass]


You will now need to go access the vhost settings which [here at least..] are located in sites-enabled

sudo nano -w /etc/apache2/sites-enabled/000-default

Remove the line; NameVirtualHost * and edit the first Vhost to include the port 80; <VirtualHost *> change to <VirtualHost *:80>.

Add an entry for the new port number and proxy to the AjaxTerm

<VirtualHost *:443>
        SetEnvIf Request_URI "^/u" dontlog
        ErrorLog /var/log/apache2/error.log
        Loglevel warn
        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/apache.pem

        ProxyRequests Off
        <Proxy *>
                AuthUserFile /srv/ajaxterm/.htpasswd
                AuthName EnterPassword
                AuthType Basic
                require valid-user

                Order Deny,allow
                Allow from all
        </Proxy>
        ProxyPass / http://localhost:8022/
        ProxyPassReverse / http://localhost:8022/
</VirtualHost>

Restart apache2 sudo /etc/init.d/apache2 restart open your firewall port 443 and try to browse to [3] where yourhost.foo is either your IP adress or your hostname/web address.


Links

AjaxTerm Homepage

Helpful page on SSL

Debian Guide