Thursday, February 28, 2008

Apache 2 and sshd installation. Ubuntu Gutsy Way.

Apache2 :


Apache2 is popular expandable web-server.

$ sudo apt-get install apache2
$ ps -ef | grep apac
root 6734 1 0 21:16 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 6737 6734 0 21:16 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 6738 6734 0 21:16 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 6740 6734 0 21:16 ? 00:00:00 /usr/sbin/apache2 -k start

put in the address line of Konqueror;
http://localhost/apache2-default/

It have persuade you, that it works.

(By the way, don't use Konqueror on complex pages with Ajax
like this blogger compose ones, it doesn't work well).

sshd


sshd is server process(daemon) that allows clients been connected to server using ssh

$ sudo apt-get install openssh-server
$ ssh-keygen
follow instructions given (just [Enter] if you satisfied with proposed) ;
$ cp ~/.ssh/[your id_rsa name] [your flash drive path for example]
use sudo if permission messages


Verification:


Check from other machine, if it is working.

I am inside LAN, after router.
So I've checked from my another home machine
http://192.168.0.3/
, that is address of server with apache and seen apache up.
ssh -i /media/path_to/id_rsa my_login@192.168.0.3 
Establishes ssh connection well, (however due to permissions on flash drive it requests for password).

It is all.

Ok, now you can be happy with two potential security holes. :)
( please read disclaimer, before doing anything.)

Possible to does after installing this services:
read man iptables,
also man xhost (usage you need is xhost +) and openssh topics about
X-forwarding to forward X applications to another machine.

No comments: