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:
ssh root@SERVER_IP_ADDRESS
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 '123.123.123.123 (123.123.123.123)' 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.
apt-get update
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.
apt-get upgrade
Step 3 – Change Password root user
passwd
Step 4 – Creating a New Account
adduser ubuntu
Step 5 – Giving Your New User Account Sudo Access
visudo
# User privilege specification root ALL=(ALL:ALL) ALL
ubuntu ALL=(ALL:ALL) ALL
Step 6 – Configuring the SSH server
nano /etc/ssh/sshd_config
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
logout
ssh -p 22500 ubuntu@SERVER_IP_ADDRESS
sudo command_to_run
Tags: #Ubuntu Server #Ubuntu Server 14.04