由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - 推荐ajaxterm
相关主题
linux有没有类似logmein的软件求助:samba设置问题
见鬼了。Apache 403 Forbidden问个基础问题,关于linux command存放地址
Apache : 好像有一个命令能显示当前的config变量?有人给做个最简单的jail的例子吗?
很悲剧的一个问题请帮忙看看为什么没空间了?
Virtual host的问题怎么让别人看到主页folder下的文件
装了ubuntu 8.10,但是sudo apt-get insall不work问个弱问题
请教LINUX USERMOD命令 (转载)which web ssh is good?
why terminal is not like an editor?SED命令求解
相关话题的讨论汇总
话题: ajaxterm话题: sudo话题: allow话题: 8022话题: directory
进入Linux版参与讨论
1 (共1页)
l*******G
发帖数: 1191
1
推荐ajaxterm:
Found ajaxterm a good thing if you just want to have a terminal through a
webpage, i.e. you'll be able to use ssh to your server from anywhere with
internet (such as public library, even if they block 22, 443, etc ports and
only allow 80)
Complete Guide:
http://mewbies.com/how_to_install_ajaxterm_tutorial.htm
My simpler guide (ubuntu)
1. Install:
# Change SSH server configuration to make sure PasswordAuthentication is yes
sudo sed -i s:PasswordAuthentication.*:PasswordAuthentication yes: /etc/ssh/sshd_config
sudo service ssh restart
#install ajaxterm
sudo apt-get install ajaxterm
sudo mkdir /srv/ajaxterm
sudo htpasswd -bc /srv/ajaxterm/.htpasswd yourusername password
# Above you should make the password verystrong, the password will be
encryped into /srv/ajaxterm/.htpasswd file.
sudo /etc/init.d/ajaxterm start
Then you can visit on the server: http://localhost:8022/
To enable remote access, After install, a few fine tuning needed:
2. patch for firefox 3.6:
edit /usr/share/ajaxterm/sarissa.js :
Change this (line 268):
XMLDocument.prototype.readyState = 0;
/**
*

Emulate IE's parseError attribute


*/
To his:
try {
XMLDocument.prototype.readyState = 0;
} catch(e) {
};
/**
*

Emulate IE's parseError attribute


*/
3. Resize window
edit /usr/share/ajaxterm/ajaxterm.py
Has this:
def __init__(self,width=80,height=24):
Changed to:
def __init__(self,width=140,height=42):

edit /usr/share/ajaxterm/ajaxterm.html
Has this: t=ajaxterm.Terminal("term",80,25);
Changed to:
t=ajaxterm.Terminal("term",140,42);
4. Make the Fonts Larger:
Change : /usr/share/ajaxterm/ajaxterm.css,include "font-size:16pt;" lines as
follows:
pre.stat .on {
background-color: #080;
font-weight: bold;
font-size: 16pt;
color: white;
cursor: pointer;
}
pre.term {
margin: 0px;
padding: 4px;
display: block;
font-family: monospace;
font-size:16pt;
white-space: pre;
background-color: black;
border-top: 1px solid white;
color: #eee;
}
5. If only port 80 is allowed on your server ,
Put the following in your /etc/apache2/sites-available/default
#===========
Listen 80

ServerAdmin webmaster@localhost
ProxyRequests Off

AuthUserFile /srv/ajaxterm/.htpasswd
AuthName EnterPassword
AuthType Basic
require valid-user
Order Deny,allow
Allow From all

ProxyPass /ajaxterm/ http://localhost:8022/
#Change the port to your ajaxterm port
# default is 8022, its set in /etc/init.d/ajaxterm
ProxyPassReverse /ajaxterm/ http://www.localhost:8022/
DocumentRoot /var/www

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /var/www/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined

#===========
6. if you have 443 (https) port open
put the following in /etc/apache2/sites-available/default-ssl
#=====

Listen 443

ServerAdmin webmaster@localhost
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
#here you should create "/etc/apache2/ssl/apache.pem" file according
to http://mewbies.com/how_to_install_ajaxterm_tutorial.htm
DocumentRoot /var/www

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

#====proxy for ajaxterm===
ProxyRequests Off

AuthType Basic
AuthName "EnterPassword"
AuthUserFile /srv/ajaxterm/.htpasswd
require valid-user
Order deny,allow
Allow from all

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


#=====
7. How to restart after changing configuration
sudo a2ensite default
sudo a2ensite default-ssl
sudo a2enmod proxy_http
sudo a2enmod proxy
sudo a2enmod ssl
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/ajaxterm restart
8. How to access:
http://ipaddress/ajaxterm/ (if you only have port 80 open)
https://ipaddress/ajaxterm/ (if you have https (port 443) open)
Screenshots:
https://help.ubuntu.com/community/AjaxTerm?action=AttachFile&do=get&target=ajaxterm.png
9. Alternatives:
webshell
anyterm
1 (共1页)
进入Linux版参与讨论
相关主题
SED命令求解Virtual host的问题
A simple Bash question about changing directory装了ubuntu 8.10,但是sudo apt-get insall不work
Can i register a ssc driver (a serial interface device) to be a spi driver ?请教LINUX USERMOD命令 (转载)
【问题】怎么知道apt-get都往Linux里写入了哪些文件why terminal is not like an editor?
linux有没有类似logmein的软件求助:samba设置问题
见鬼了。Apache 403 Forbidden问个基础问题,关于linux command存放地址
Apache : 好像有一个命令能显示当前的config变量?有人给做个最简单的jail的例子吗?
很悲剧的一个问题请帮忙看看为什么没空间了?
相关话题的讨论汇总
话题: ajaxterm话题: sudo话题: allow话题: 8022话题: directory