{"id":387,"date":"2017-10-25T17:01:46","date_gmt":"2017-10-25T17:01:46","guid":{"rendered":"http:\/\/ivywp-light.ecko.me\/?p=387"},"modified":"2017-10-25T17:01:46","modified_gmt":"2017-10-25T17:01:46","slug":"initial-server-setup-with-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/crownandluxury.com\/?p=387","title":{"rendered":"Initial Server Configuration &#038; Setup on Debian"},"content":{"rendered":"\n<p>The Debian <i>Stable<\/i> distribution is one of the most popular for personal computers and network servers, and has been used as a base for several other Linux distributions.&nbsp;Debian was first announced in 1993 by Ian Murdock, Debian 0.01 was released in August 1993, and the first <i>stable<\/i> release was made in 1996.<\/p>\n\n\n\n<p>When you first create a new Debian 8 server, there are a few configuration steps that you should take early on as part of the basic setup. This will increase the security and usability of your server and will give you a solid foundation for subsequent actions.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Step One: Root Login<\/h2>\n\n\n\n<p>To log into your server initially, you will need to know your server&#8217;s public IP address and the password for the &#8220;root&#8221; user&#8217;s account. For servers on DigitalOcean, you will receive an email with your server credentials and the server&#8217;s IP address.<\/p>\n\n\n\n<p>The root user is the administrative user in a Linux environment that has very broad privileges. Because of the heightened privileges of the root account, you are actually <em>discouraged<\/em> from using it on a regular basis. This is because part of the power inherent with the root account is the ability to make very destructive changes, even by accident.<\/p>\n\n\n\n<p>In this guide, we&#8217;ll help you set up an alternative user account with a reduced scope of influence for day-to-day work. We&#8217;ll teach you how to gain increased privileges during the times when you need them.&nbsp;The first step is to log into your server, and the only account we start out with is the root account. We can connect to the server by using the <code>ssh<\/code> command in the terminal. The command will look like this:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code>ssh root@server_ip_address<\/code><\/pre>\n\n\n\n<p>You will most likely see a warning in your terminal window that looks like this:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code>The authenticity of host '123.123.123.123 (123.123.123.123)' can't be established.\nECDSA key fingerpring is\n79:95:46:1a:ab:37:11:8e:86:54:36:38:bb:3c:fa:c0.\nAre you sure you want to continue connecting (yes\/no)?<\/code><\/pre>\n\n\n\n<p>Here, your computer is basically telling you that it doesn&#8217;t recognize your remote server. Since this is your first time connecting, this is completely expected.&nbsp;Go ahead and type &#8220;yes&#8221; to accept the connection. Afterwards, you&#8217;ll need to enter the password for the root account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step Two: Change Your Password<\/h2>\n\n\n\n<p>You are not likely to remember the password that is currently set for your root account. You can change the password to something you will remember more easily by typing:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code>passwd<\/code><\/pre>\n\n\n\n<p>It will ask you to enter and confirm your new password. During this process, you will not see anything show up on your screen as you type. This is intentional and is there so that people looking over your shoulder cannot guess your password by the number of characters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step Three: Create a New User<\/h2>\n\n\n\n<p>At this point, we&#8217;re prepared to add the new user account that we will use to log in from now on.&nbsp;I&#8217;m going to name my user &#8220;demo&#8221;, but you can select whatever name you&#8217;d like:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code>adduser demo<\/code><\/pre>\n\n\n\n<p>You will be asked a few questions, starting with the account password.&nbsp;Fill out the password and, optionally, fill in any of the additional information if you would like. This is not required and you can just hit &#8220;ENTER&#8221; in any field you wish to skip.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step Four: Root Privileges<\/h2>\n\n\n\n<p>To avoid having to log out of our normal user and log back in as the root account, we can set up what is known as &#8220;sudo&#8221; privileges for our normal account. This will allow our normal user to run commands with administrative privileges by putting the word &#8220;sudo&#8221; before each command.&nbsp;To add these privileges to our new account, we need to use a command called <code>visudo<\/code>. This will open a configuration file:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code>visudo<\/code><\/pre>\n\n\n\n<p>Scroll down until you find a section that deals with user privileges. It will look similar to this:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code># User privilege specification\nroot    ALL=(ALL:ALL) ALL<\/code><\/pre>\n\n\n\n<p>While this might look complicated, we don&#8217;t need to worry about that. All we need to do is add another line below it that follows the format, replacing &#8220;demo&#8221; with the user you created:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code># User privilege specification\nroot    ALL=(ALL:ALL) ALL\ndemo    ALL=(ALL:ALL) ALL<\/code><\/pre>\n\n\n\n<p>After this is done, press CTRL-X to exit. You will have to type &#8220;Y&#8221; to save the file and then press &#8220;ENTER&#8221; to confirm the file location.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step Five: Configure SSH (Optional)<\/h2>\n\n\n\n<p>Now that we have our new account, we can secure our server a little bit by modifying the configuration of SSH (the program that allows us to log in remotely).&nbsp;Begin by opening the configuration file with your text editor as root:\n<\/p>\n\n\n\n<pre class=\"wp-block-code eckosc_syntax eckosc_syntax_theme_dark wp-block-code__dark language-bash\" data-language=\"language-bash\" data-color-scheme=\"dark\"><code>nano \/etc\/ssh\/sshd_config<\/code><\/pre>\n\n\n\n<p>Continue reading this guide at DigitalOcean. This article has been used as an example of&nbsp;an&nbsp;Ecko&nbsp;WordPress theme. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Debian Stable distribution is one of the most popular for personal computers and network servers, and has been used as a base for several other Linux distributions.&nbsp;Debian was first announced in 1993 by Ian Murdock, Debian 0.01 was released in August 1993, and the first stable release was made in 1996. When you first [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":979,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[25],"class_list":["post-387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administration","tag-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Initial Server Configuration &amp; Setup on Debian - Crown an Luxury Timepieces<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crownandluxury.com\/?p=387\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Initial Server Configuration &amp; Setup on Debian - Crown an Luxury Timepieces\" \/>\n<meta property=\"og:description\" content=\"The Debian Stable distribution is one of the most popular for personal computers and network servers, and has been used as a base for several other Linux distributions.&nbsp;Debian was first announced in 1993 by Ian Murdock, Debian 0.01 was released in August 1993, and the first stable release was made in 1996. When you first [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crownandluxury.com\/?p=387\" \/>\n<meta property=\"og:site_name\" content=\"Crown an Luxury Timepieces\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-25T17:01:46+00:00\" \/>\n<meta name=\"author\" content=\"CrownAndLuxury\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CrownAndLuxury\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crownandluxury.com\/?p=387\",\"url\":\"https:\/\/crownandluxury.com\/?p=387\",\"name\":\"Initial Server Configuration & Setup on Debian - Crown an Luxury Timepieces\",\"isPartOf\":{\"@id\":\"https:\/\/crownandluxury.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/crownandluxury.com\/?p=387#primaryimage\"},\"image\":{\"@id\":\"https:\/\/crownandluxury.com\/?p=387#primaryimage\"},\"thumbnailUrl\":\"https:\/\/crownandluxury.com\/wp-content\/uploads\/2016\/02\/image-21.jpg\",\"datePublished\":\"2017-10-25T17:01:46+00:00\",\"author\":{\"@id\":\"https:\/\/crownandluxury.com\/#\/schema\/person\/689dd98bb396b64007dc7139deb62482\"},\"breadcrumb\":{\"@id\":\"https:\/\/crownandluxury.com\/?p=387#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crownandluxury.com\/?p=387\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crownandluxury.com\/?p=387#primaryimage\",\"url\":\"https:\/\/crownandluxury.com\/wp-content\/uploads\/2016\/02\/image-21.jpg\",\"contentUrl\":\"https:\/\/crownandluxury.com\/wp-content\/uploads\/2016\/02\/image-21.jpg\",\"width\":1920,\"height\":1200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crownandluxury.com\/?p=387#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crownandluxury.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Initial Server Configuration &#038; Setup on Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crownandluxury.com\/#website\",\"url\":\"https:\/\/crownandluxury.com\/\",\"name\":\"Crown an Luxury Timepieces\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crownandluxury.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/crownandluxury.com\/#\/schema\/person\/689dd98bb396b64007dc7139deb62482\",\"name\":\"CrownAndLuxury\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crownandluxury.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1eef7995d66a0a390150f32f123dda9c52df4bb23af2e403d2f9d5ea8babaa82?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1eef7995d66a0a390150f32f123dda9c52df4bb23af2e403d2f9d5ea8babaa82?s=96&d=mm&r=g\",\"caption\":\"CrownAndLuxury\"},\"sameAs\":[\"https:\/\/crownandluxury.com\"],\"url\":\"https:\/\/crownandluxury.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Initial Server Configuration & Setup on Debian - Crown an Luxury Timepieces","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crownandluxury.com\/?p=387","og_locale":"en_US","og_type":"article","og_title":"Initial Server Configuration & Setup on Debian - Crown an Luxury Timepieces","og_description":"The Debian Stable distribution is one of the most popular for personal computers and network servers, and has been used as a base for several other Linux distributions.&nbsp;Debian was first announced in 1993 by Ian Murdock, Debian 0.01 was released in August 1993, and the first stable release was made in 1996. When you first [&hellip;]","og_url":"https:\/\/crownandluxury.com\/?p=387","og_site_name":"Crown an Luxury Timepieces","article_published_time":"2017-10-25T17:01:46+00:00","author":"CrownAndLuxury","twitter_card":"summary_large_image","twitter_misc":{"Written by":"CrownAndLuxury","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crownandluxury.com\/?p=387","url":"https:\/\/crownandluxury.com\/?p=387","name":"Initial Server Configuration & Setup on Debian - Crown an Luxury Timepieces","isPartOf":{"@id":"https:\/\/crownandluxury.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/crownandluxury.com\/?p=387#primaryimage"},"image":{"@id":"https:\/\/crownandluxury.com\/?p=387#primaryimage"},"thumbnailUrl":"https:\/\/crownandluxury.com\/wp-content\/uploads\/2016\/02\/image-21.jpg","datePublished":"2017-10-25T17:01:46+00:00","author":{"@id":"https:\/\/crownandluxury.com\/#\/schema\/person\/689dd98bb396b64007dc7139deb62482"},"breadcrumb":{"@id":"https:\/\/crownandluxury.com\/?p=387#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crownandluxury.com\/?p=387"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crownandluxury.com\/?p=387#primaryimage","url":"https:\/\/crownandluxury.com\/wp-content\/uploads\/2016\/02\/image-21.jpg","contentUrl":"https:\/\/crownandluxury.com\/wp-content\/uploads\/2016\/02\/image-21.jpg","width":1920,"height":1200},{"@type":"BreadcrumbList","@id":"https:\/\/crownandluxury.com\/?p=387#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crownandluxury.com\/"},{"@type":"ListItem","position":2,"name":"Initial Server Configuration &#038; Setup on Debian"}]},{"@type":"WebSite","@id":"https:\/\/crownandluxury.com\/#website","url":"https:\/\/crownandluxury.com\/","name":"Crown an Luxury Timepieces","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crownandluxury.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/crownandluxury.com\/#\/schema\/person\/689dd98bb396b64007dc7139deb62482","name":"CrownAndLuxury","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crownandluxury.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1eef7995d66a0a390150f32f123dda9c52df4bb23af2e403d2f9d5ea8babaa82?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1eef7995d66a0a390150f32f123dda9c52df4bb23af2e403d2f9d5ea8babaa82?s=96&d=mm&r=g","caption":"CrownAndLuxury"},"sameAs":["https:\/\/crownandluxury.com"],"url":"https:\/\/crownandluxury.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/crownandluxury.com\/index.php?rest_route=\/wp\/v2\/posts\/387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crownandluxury.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crownandluxury.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crownandluxury.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crownandluxury.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=387"}],"version-history":[{"count":0,"href":"https:\/\/crownandluxury.com\/index.php?rest_route=\/wp\/v2\/posts\/387\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/crownandluxury.com\/index.php?rest_route=\/wp\/v2\/media\/979"}],"wp:attachment":[{"href":"https:\/\/crownandluxury.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crownandluxury.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crownandluxury.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}