Friday 31 December 2010

Disable Root SSH Login on Debian

Before we begin, you should make sure that you have a regular user account and that you can su or sudo to root from it. So  do these first:


adduser usrer1
assign a passwd to user1. and then add it to sudoers. But first need to install sudo:


apt-get install sudo
add this line inside to 


        nano /etc/sudoers


user1  ALL=(ALL) ALL


Open the file up while logged on as root.
nano /etc/ssh/sshd_config
Find this section in the file, containing the line with “PermitRootLogin” in it.
#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
Make the line look like this to disable logging in through ssh as root.

PermitRootLogin no
Now you’ll need to restart the sshd service:

/etc/init.d/ssh restart
Now nobody can brute force your root login, at least.

Source: How-to Geek

Monday 27 December 2010

install the latest nginx

You can get the latest stable version of Nginx from the Nginx PPA on Launchpad:
You will need to have root privileges to perform the following commands.
 
sudo su -
echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu lucid main" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
apt-get update 
apt-get install nginx

Source: nginx wiki

Upgrade Ubuntu server

aptitude update
and install the package update-manager-core:
aptitude install update-manager-core


Then run

do-release-upgrade

More details in howtoforge