In this tutorial, we are going to describes the first things you should do after fresh installation Ubuntu Server 14.04. There are several configuration steps that you should follow as part of the basic setup of Ubuntu Server 14.04.
Step 1 – Login as Root via SSH
Before login into your ubuntu server, you already know the information about your server’s public IP address and the password for the “root” user’s account. Now, log in into your server with the following command:
If you see a message like below, don’t panic. As it is your first connection to your ubuntu server, your computer is telling you that it doesn’t recognize the remote server. Just type “yes” to confirm the authentication.
The authenticity of host '22.214.171.124 (126.96.36.199)' can't be established. ECDSA key fingerpring is 79:95:46:1a:ab:37:11:8e:86:54:36:38:bb:3c:fa:c0. Are you sure you want to continue connecting (yes/no)?
Step 2 – Updating Ubuntu Server
After you have logged into your ubuntu server as root, update your ubuntu server repositories by typing the following command.
Type the followong command, if you want to upgrade all existing packages to the latest version. You should hit Y after it asks you if you want to update all packages.
Step 3 – Change Password root user
Step 4 – Creating a New Account
Step 5 – Giving Your New User Account Sudo Access
# User privilege specification root ALL=(ALL:ALL) ALL
ubuntu ALL=(ALL:ALL) ALL
Step 6 – Configuring the SSH server
Port 22 PermitRootLogin yes
Port 22500 PermitRootLogin no
- Port : Although port 22 is the default. In this tutorial we are using port 22500, you can change this to any number between 1025 and 65536.
- PermitRootLogin: change this from yes to no to stop future root login. You will now only be logging on as the new user.
service ssh restart
ssh -p 22500 ubuntu@SERVER_IP_ADDRESS