Once you got your server built, in my case a ubuntu 8.04.1 you need to login as root and change root password. You should be given root login password and
If you have just rebuilt your server you’ll need to follow this to clear the trace of your server invalid signature.
Now you can first change your root password if you want
Login as root is not recommended so you should create a new user [username]
adduser --ingroup users [username] answer all questions and confirm ‘yes’ at the end. Next you have to grant [username] permissions as root.
I don’t like
vi so I use nano which comes with 8.04.1 [P.S. if you insist to learn Vi then follow lesson]
export EDITOR=nano then
at end of file insert then save it
[username] ALL=(ALL) ALL
Next edit ssh config to use a special port and stop root login
change port from 22 to a 4~5 digits figure [yourportnumber] at your choice (it was said any number above 1024 would be safe) that you could remember and also change
PermitRootLogin from yes to no, don’t forget to reload ssh
Now login as new [username] in separate terminal window, a safe step, in case of trouble you haven’t left the root login session yet.
ssh -p [yourportnumber] [username]@your.server.ip.number
Happy with it then exit root, now make sure your server is updated and upgraded, do this
apt-get update and
apt-get upgrade from now on you’ll need to add
sudo in front of codes below and will be asked for password from time to time.