Securing a server is a continuous process as new vulnerabilities are discovered everyday. But you will be relatively safe if you take some basic security measures like locking root access, not allowing password authentication, setting up a basic firewall and log watching mechanism and enabling automatic updates.
1. Login as root and update package list and upgrade tools.