Archive for April, 2008

April
29th 2008
Automate login from ssh2 client to openssh host

Posted under Uncategorized

To automate the login from a client with ssh2 to a host running openssh, do the following:

  • On ssh2 client: ssh-keygen -t rsa -b 1024, use an empty password (just hit enter)
  • Copy the file ~/.ssh2/id_rsa_1024_a.pub to the host
  • On ssh2 client, add file ~/.ssh2/identification, with the following single line in it:
    IdKey id_rsa_1024_a
  • On the host, do: ssh-keygen -i -f id_rsa_1024_a.pub >> ~/.ssh/authorized_keys
  • On the host, open ~/.ssh/authorized_keys with your favorite editor and append user@hostname to the last line (replace user with the username from the client and hostname with the hostname of the client :)
  • That’s it :)

No Comments »

April
29th 2008
How to build JSP

Posted under Uncategorized

How to build JSP(Java Server Pages):-

If you have used Microsoft’s popular Active Server Pages (ASP) then you will have a good idea of what JSP is. It consists of HTML or XML markup into which special tags and code blocks are inserted. The code is executed on the server and the result is a dynamic page that is returned to the client browser. Although JSPs are simple to build they have at their disposal the full power of object-oriented Java and the Java Server API. JSPs make heavy use of Java Beans, which are classes that follow a standard pattern of a no-argument constructor (required in JSPs) and public GET and SET methods.

JSP is first parsed into a java source file which is then compiled into a servlet class. This occurs when the page is first requested, so there is a performance hit at that point. But if you design your JSP carefully the performance of the class, once compiled, should be equal to that of a purpose-built servlet. It is possible to view the servlet source code that is generated by the parser, but it’s not recommended that you make any changes in it.

JSPs are supported by a wide number of web servers through the use of plugins or modules. One of the best implementations till now is that developed for the Apache web server.The Sun Microsystems Java Server Web Development Kit (JSWDK) available from java.sun.com which contains all you need to start developing JSPs and servlets, including a JSP parser and a simple HTTP server.

No Comments »

April
29th 2008
Define JSP

Posted under Uncategorized

What is JSP?

JSP stands for Java Server Pages.JSP is the normal HTML with Java code pieces embedded in them. JSP are a way to create dynamic Web content.JSP may also be used to generate and consume XML between n-tier servers or between servers and clients.It is a technology used for controlling the content or appearance of Web pages through the use of servlet s, small programs that are specified in the Web page and run on the Web server to modify the Web page before it is sent to the user who requested it. Sun Microsystems, the developer of Java, also refers to the JSP technology as the Servlet application program interface (API). JSP is comparable to Microsoft’s Active Server Page (ASP ) technology. Whereas a JSP calls a Java program that is executed by the Web server, an ASP contains a script that is interpreted by a script interpreter (such as VBScript or JScript) before the page is sent to the user. However, JSP technology provides a more convenient way to code a servlet. Translation occurs the first time the application is run. A JSP translator is triggered by the .jsp file name extension in a URL. JSPs are fully interoperable with servlets. You can include output from a servlet or forward the output to a servlet, and a servlet can include output from a JSP or forward output to a JSP.

No Comments »

April
29th 2008
How does Spam filter works?

Posted under Uncategorized

The server-side Spam filter works in conjunction with the client-side (end user) Web-Based Email interface. In essence, the end user utilizes the client-side interface to submit selected email messages for spam analysis. By analyzing all the messages the spam filter compiles information that enables it to detect and intercept spam. As an increasing number of email messages are analyzed, the filter becomes increasingly adept at intercepting electronic mail that this particular user considers spam.

No Comments »

April
29th 2008
Advantages of IMAP ?

Posted under Uncategorized

1)IMAP’s main advantage is that the user can see all the message headers at a glance, and open only those which are required this saves significant download time especially if users often forward or delete messages without reading them.

2)It provides freedom for user to download attachments at anytime from anywhere.

3)IMAP enables server-based searching and selection to minimize data transfer.

4)It support for simultaneous update and update discovery in shared folders.

5)It’s Superior online performance.

6)It’s ability to manipulate remote folders other than INBOX is fundamental to online and disconnected operation. This means being able to save messages from one folder to a another one, being able to access archived messages subsequently, and allowing for multiple incoming message folders.

7)Once you create a Spamscreen folder on the server, SPAM is automatically filtered there. The folder can be periodically reviewed if you use an IMAP mail program to check your filters.

In short, IMAP is a fantastic way to work with email.

No Comments »

April
29th 2008
What is IMAP?

Posted under Uncategorized

IMAP Stands for Internet Message Access Protocol.It was originally developed in 1986 at Stanford.IMAP is gradually replacing POP as the main protocol used by email clients in communicating with email servers.IMAP includes more functions than the similar and popular POP mail protocol.It can be used by customers who need to keep their mail on a remote server.By using IMAP an email client program can not only retrieve email but can also manipulate message stored on the server, without having to actually retrieve the messages. So messages can be deleted, have their status changed, multiple mail boxes can be managed, etc.The latest version of IMAP that is IMAP4, is similar to POP3 but supports some additional features. For example, with IMAP4, you can search through your email messages for keywords while the messages are still on the mail server.

Leaving your messages on the server is very convenient since it means that you can retrieve them from anywhere in the world. When you are setting your delivery options, “IMAP” appears in the e-mail address so that the GUMail system will leave your e-mail messages on the server. People who send you e-mail should not include “IMAP” as part of your e-mail address.

No Comments »

April
29th 2008
Define Spam Filter?

Posted under Uncategorized

It is the concept of detecting and intercepting unwanted bulk mail — or “spam” — before it reaches a recipient’s mailbox. Spam filters detect bulk mail through the occurrence of certain phrases and known as spammer IP addresses in incoming mail. However, because distributors of spam are increasingly innovative in their efforts to circumvent the spam filters that protect email users’ mailboxes, spam is a running target, and developers of spam-filtering technology are constantly being challenged in their quest to keep the bulk-mail onslaught at bay. Thus, in order to effectively shield email users from spam, a spam filter must be flexible. The Spam filter enables users to personalize the filter by training it to detect and intercept mail that fit each user’s particular preference and definition of spam.

No Comments »

April
29th 2008
Linux:Disable direct root login

Posted under Uncategorized

By permitting the root user to login directly is a major security issue.
We will show you how to disable it. So that you can login as root but not directly, reducing the security issue.

This forces the hacker to  guess 2 seperate passwords to gain root access.

First of you will need to login as your admin user in SSH, then after that switch to the super user with the su command to get root.

We will be forcing the use of SSH protocol 2, which is a newer, more secure SSH protocol
There are some more ways to help your server stay safe from the Hackers. If you are using cPanel be sure that you add your admin user to the ‘wheel’ group so that you will be able to ’su -’ to root, otherwise you may lock yourself out of root.

1] SSH into your server as ‘admin’ and get root access by su

2] Copy and paste this line to edit the file for SSH logins
pico -w /etc/ssh/sshd_config

3] Find the line
Protocol 2, 1

4] Uncomment it and change it to look like
Protocol 2

5] Next, find the line
PermitRootLogin yes

6] Uncomment it and make it look like Permit Root Login no

7] Save the file Ctrl+X then Y then enter

8] Now you can restart SSH
/etc/rc.d/init.d/sshd restart

Now, no one will be able to login to root with out first loggin in as admin and ’su -’ to root, and you will be forcing the use of a more secure protocol. Be sure that you remember both the passwords.

No Comments »

April
29th 2008
What is Apache Server ?

Posted under Uncategorized

Ans: It is a server which is Often referred to as simply Apache, is a web server notable for playing a key role in the initial growth of the World Wide Web. It was the 1st viable alternative to the Netscape Communications Corporation web server , and has since evolved to rival other Unix-based web servers in terms of functionality and performance. Since April 1996 Apache has been the most popular HTTP server on the World Wide Web; since March 2006 however it has experienced a steady decline of its market share. As of August 2007 Apache served 50% of all websiteThe Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The main Aim of this project is to provide a secure, efficient and extensible server which provides HTTP services in sync with the current HTTP standards.This  Apache web server  project is a main Foundation of the Apache Software .The core development of this Apache Web server is done by a group of 20 volunteer programmers, called the Apache Group. However, because the source codeof Apache is freely available, anyone can adapt the server for specific needs, and there is a large public library of Apache add-ons. In many respects, development of Apache is similar to development of the Linux OS.

No Comments »

April
29th 2008
How to install cPanel subversion on VPS?

Posted under Uncategorized

Before proceeding make a backup of your VPS because this is a  work in progress , In few situations you can receive some errors even after you have followed all these steps. We will work with you to solve them and hopefully produce a firm guide with a list of potential errors.

These are the following steps:-

1) Install subversion : It’s very easy to install subversion on centos, just a use Yellow dog Updater Modified

2) Now check if “perl-URI” is installed or not. If in case it is not installed than you can install it by using YUM install perl-URI.

3) After that create a repository.

cd /var/
mkdir -p repo/source/
svnadmin create /var/repo/source

Note:By using above commands you can create a subversion repo named source. You can check inside the directory if lot of files are created. If created subversion works fine.

4) Now you can proceed with Apache 2 installation. We have chosen Apache 2.0.59

wget the location of Apache

tar -zxvf httpd-2.0.59.tar.gz
cd httpd-2.0.59
./configure –prefix=/usr/local/apache2 –with-port=2080 –enable-dav –enable-dav-fs –enable-proxy –enable-rewrite –enable-so
make
make install
/usr/local/apache2/bin/apachectl start
==
Apache2 installed at port 2080 with dav , proxy and rewrite and started

5) After this we have to compile mod_svn for apache 2. For this you have to download the SVN source from the subversion site, first please check the version of subversion using yum

Next you have to download the same version of subversion source, untar it and need to compile mod_svn now:

./configure –with-apxs=/usr/local/apache2/bin/apxs
make
make install

Now mod_svn is installed and activated on apache2.

6) Configure Apache 2 for svn. For this change the settings httpd.conf of apache 2. This file will be located here /usr/local/apache2/conf/httpd.conf

<location>
DAV svn
SVNPath /var/repo/source
</location>

After making the above changes Restart Apache2. Now you should be able to see the svn files from this url http://localhost:2080/ or http://<serverip>:2080. You should be able to see the subversion files at revision 0. There will be nothing in it as we have not added any files.

7) Now Add proxy to apache 1.3 so that we can internally proxy the files between Apache 2 and Apache 1. You can download the source of currently installed apache 1.3 or you can find the same in /root/installd/buildapache/apache_1.3.xx/src/modules/proxy
Just goto that directory and run this command

/usr/local/apache/bin/apxs -i -c *.c

This will install mod_proxy to apache 1.3

8) You have add this setting to apache 1.3 conf file to proxy the http://localhost:2080/ in standard port 80 of some website.
Add these line to any virtual host present in the conf file.

LoadModule proxy_module modules/mod_proxy.so
AddModule mod_proxy.c
ProxyRequests Off
ProxyPass / http://locahost:2080/

No Comments »

Next »