Home » Categories » Linux Cloud Server » UBuntu |
Initial Server Setup with Ubuntu 12.04 |
Article Number: 160 | Rating: Unrated | Last Updated: Sun, Jan 5, 2014 at 9:01 PM
|
The Basics When you first begin to access your fresh new server, there are a few early steps you should take to make it more secure. Some of the first tasks required on a virtual private server can include setting up a new user, providing them with the proper privileges, and configuring SSH. Step One—Root Login Once you know your IP address and
root password, login as the main user, root. ssh root@123.45.67.890 The terminal will show:The authenticity of host '69.55.55.20 (69.55.55.20)' can't be established. ECDSA key fingerprint 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)? Go ahead and type yes, and then enter your root password. Step Two—Change Your Password Currently your root password is the default one that was sent to you when you registered your server instance. The first thing to do is change it to one of your choice. passwd Step Three— Create a New User After you have logged in and changed
your password, you will not need to login again as root. In this step we will
make a new user and give them all of the root capabilities. adduser demo After you set the password, you do not need to enter any further information about the new user. You can leave all the lines blank if you wish Step Four— Root Privileges As of yet, only root has all of the
administrative capabilities. We are going to give the new user the root
privileges. visudo Find the section called user privilege specification. # User privilege specification root ALL=(ALL:ALL) ALL Under there, add the following line, granting all the permissions to your new user: demo ALL=(ALL:ALL) ALL Type ‘cntrl x’ to exit the file. Step Five— Configure SSH (OPTIONAL) Now it’s time to make the server
more secure. These steps are optional. Please keep in mind that changing the
port and restricting root login may make logging in more difficult in the
future. If you misplace this information, it could be nearly impossible. nano /etc/ssh/sshd_config Find the following sections and change the information where applicable: Port 25000 Protocol 2 PermitRootLogin no We’ll take these one by one. UseDNS no AllowUsers demo Save and Exit Step Six— Reload and Done! Reload SSH, and it will implement the new ports and settings. reload ssh To test the new settings (don’t logout of root yet), open a new terminal
window and login as your new user. ssh -p 25000 demo@123.45.67.890 Your prompt should now say: [demo@yourname ~]$
|
Attachments
There are no attachments for this article.
|
How to Install OpenVPN Access Server on Ubuntu 12.04
Viewed 3250 times since Thu, Jan 2, 2014
How To Setup uWSGI On Ubuntu 12.10
Viewed 1914 times since Sat, Jan 4, 2014
How To Create Nagios Plugins With Perl On Ubuntu 12.10
Viewed 2114 times since Sat, Jan 4, 2014
How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS
Viewed 3261 times since Mon, Dec 23, 2013
How To Create Nagios Plugins With Python On Ubuntu 12.10
Viewed 6531 times since Sat, Jan 4, 2014
How To Install Wordpress on Ubuntu 12.04
Viewed 2384 times since Tue, Dec 24, 2013
How To Set Up an NFS Mount on Ubuntu 12.04
Viewed 10083 times since Tue, Dec 24, 2013
How To Create Nagios Plugins With Bash On Ubuntu 12.10
Viewed 1921 times since Sat, Jan 4, 2014
How To Setup ownCloud 5 On Ubuntu 12.10
Viewed 5518 times since Sat, Jan 4, 2014
Docker Explained: How To Containerize Python Web Applications
Viewed 4444 times since Sat, Jan 4, 2014
|