{"id":2498,"date":"2022-01-09T21:33:31","date_gmt":"2022-01-09T18:33:31","guid":{"rendered":"https:\/\/www.etemkeskin.com\/?p=2498"},"modified":"2022-01-09T21:33:32","modified_gmt":"2022-01-09T18:33:32","slug":"how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh","status":"publish","type":"post","link":"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/","title":{"rendered":"How to Create User Account and Connect Ubuntu Linux Server using Username and Password with SSH"},"content":{"rendered":"\n<p>In this post, I will explain how to create a <strong>new user<\/strong> on a Linux machine and connect to this machine remotely with <strong>user information<\/strong> and<strong> password<\/strong>. The Linux server machine used in this post has <strong>Ubuntu 20.04<\/strong> version installed.<\/p>\n\n\n\n<p>Bu yaz\u0131da Linux makinesinde yeni bir <strong>kullan\u0131c\u0131<\/strong> olu\u015fturarak bu makineye  <strong>kullan\u0131c\u0131 bilgisi <\/strong>ve <strong>parola<\/strong> ile uzaktan nas\u0131l ba\u011flan\u0131laca\u011f\u0131n\u0131 anlataca\u011f\u0131m. Bu yaz\u0131da kullan\u0131lan Linux server makinesi <strong>Ubuntu 20.04<\/strong> versiyonu y\u00fckl\u00fcd\u00fcr. <\/p>\n\n\n\n<p>First, we need to have the <strong>root<\/strong> user information of the Linux machine for which we will define a <strong>new user<\/strong>. Then we connect to the Linux machine with this information and open the<strong> terminal<\/strong> screen.<\/p>\n\n\n\n<h3>Creating a New User<\/h3>\n\n\n\n<p>To create a new user named <strong>etem<\/strong>, enter the following commands on the terminal screen and click [ENTER].<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">$ sudo adduser etem<\/pre><\/div>\n\n\n\n<p>We enter the password on the screen that comes up.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">New password:\nRetype new password:\npasswd: password updated successfully<\/pre><\/div>\n\n\n\n<p>In the next step, we will create the new user by either leaving blank or filling in the relevant fields below.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">Changing the user information for username\nEnter the new value, or press ENTER for the default\n\tFull Name []:\n\tRoom Number []:\n\tWork Phone []:\n\tHome Phone []:\n\tOther []:<\/pre><\/div>\n\n\n\n<p>If we want to see the newly created user:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">$ cat \/etc\/passwd\n$ grep '^etem' \/etc\/passwd<\/pre><\/div>\n\n\n\n<p>We need to edit the <strong>sshd_config file<\/strong> so that the user we created can connect with a <strong>password<\/strong> without a <strong>public key<\/strong>. If this file is not edited, ssh connection request is made from remote terminal screen.<\/p>\n\n\n\n<p>If this file is not edited, you will receive the following warning when ssh connection request is made from the remote terminal screen.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">etem@165.29.78.13: Permission denied (publickey).\n(base) etemkeskin@192 ~ %<\/pre><\/div>\n\n\n\n<p>To solve this issue, enter commands,<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">$ sudo nano \/etc\/ssh\/sshd_config<\/pre><\/div>\n\n\n\n<p>then, change the statement next to <strong>PasswordAuthentication<\/strong> in the sshd_config file to <strong>yes<\/strong>  as seen the image below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"541\" height=\"103\" src=\"https:\/\/www.etemkeskin.com\/wp-content\/uploads\/2022\/01\/Ekran-Resmi-2022-01-07-10.28.43.png\" alt=\"\" class=\"wp-image-2508\"\/><\/figure><\/div>\n\n\n\n<p>If you want to give <strong>root<\/strong> privilege to the newly created user,<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">$ adduser etem sudo\n$ sudo systemctl restart sshd<\/pre><\/div>\n\n\n\n<p>You can make the ssh connection with the newly created user information by entering the following commands and password.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application\/x-powershell&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;showPanel&quot;:false,&quot;language&quot;:&quot;PowerShell&quot;,&quot;modeName&quot;:&quot;powershell&quot;}\">$ ssh etem@your-ubuntu-server-ip<\/pre><\/div>\n\n\n\n<p>Good luck&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I will explain how to create a new user on a Linux machine and connect to this machine remotely with user information and password. The Linux server machine used in this post has Ubuntu 20.04 version installed. Bu yaz\u0131da Linux makinesinde yeni bir kullan\u0131c\u0131 olu\u015fturarak bu makineye kullan\u0131c\u0131 bilgisi ve parola ile [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[86],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create User Account and Connect Ubuntu Linux Server using Username and Password with SSH - blog website<\/title>\n<meta name=\"description\" content=\"In this post, I will explain how to create a new user on a Linux machine and connect to this machine remotely with user information and password. The Linux server machine used in this post has Ubuntu 20.04 version installed.Bu yaz\u0131da Linux makinesinde yeni bir kullan\u0131c\u0131 olu\u015fturarak bu makineye kullan\u0131c\u0131 bilgisi ve parola ile uzaktan nas\u0131l ba\u011flan\u0131laca\u011f\u0131n\u0131 anlataca\u011f\u0131m. Bu yaz\u0131da kullan\u0131lan Linux server makinesi Ubuntu 20.04 versiyonu y\u00fckl\u00fcd\u00fcr. First, we need to have the root user information of the Linux machine for which we will define a new user. Then we connect to the Linux machine with this information and open the terminal screen.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create User Account and Connect Ubuntu Linux Server using Username and Password with SSH - blog website\" \/>\n<meta property=\"og:description\" content=\"In this post, I will explain how to create a new user on a Linux machine and connect to this machine remotely with user information and password. The Linux server machine used in this post has Ubuntu 20.04 version installed.Bu yaz\u0131da Linux makinesinde yeni bir kullan\u0131c\u0131 olu\u015fturarak bu makineye kullan\u0131c\u0131 bilgisi ve parola ile uzaktan nas\u0131l ba\u011flan\u0131laca\u011f\u0131n\u0131 anlataca\u011f\u0131m. Bu yaz\u0131da kullan\u0131lan Linux server makinesi Ubuntu 20.04 versiyonu y\u00fckl\u00fcd\u00fcr. First, we need to have the root user information of the Linux machine for which we will define a new user. Then we connect to the Linux machine with this information and open the terminal screen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"blog website\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-09T18:33:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-09T18:33:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.etemkeskin.com\/wp-content\/uploads\/2022\/01\/Ekran-Resmi-2022-01-07-10.28.43.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.etemkeskin.com\/#website\",\"url\":\"https:\/\/www.etemkeskin.com\/\",\"name\":\"blog website\",\"description\":\"Etem KESK\\u0130N\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.etemkeskin.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"tr\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/#primaryimage\",\"inLanguage\":\"tr\",\"url\":\"https:\/\/www.etemkeskin.com\/wp-content\/uploads\/2022\/01\/Ekran-Resmi-2022-01-07-10.28.43.png\",\"contentUrl\":\"https:\/\/www.etemkeskin.com\/wp-content\/uploads\/2022\/01\/Ekran-Resmi-2022-01-07-10.28.43.png\",\"width\":541,\"height\":103},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/#webpage\",\"url\":\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/\",\"name\":\"How to Create User Account and Connect Ubuntu Linux Server using Username and Password with SSH - blog website\",\"isPartOf\":{\"@id\":\"https:\/\/www.etemkeskin.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/#primaryimage\"},\"datePublished\":\"2022-01-09T18:33:31+00:00\",\"dateModified\":\"2022-01-09T18:33:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.etemkeskin.com\/#\/schema\/person\/dcbc30282861ce578b96a79ce8789629\"},\"description\":\"In this post, I will explain how to create a new user on a Linux machine and connect to this machine remotely with user information and password. The Linux server machine used in this post has Ubuntu 20.04 version installed.Bu yaz\\u0131da Linux makinesinde yeni bir kullan\\u0131c\\u0131 olu\\u015fturarak bu makineye kullan\\u0131c\\u0131 bilgisi ve parola ile uzaktan nas\\u0131l ba\\u011flan\\u0131laca\\u011f\\u0131n\\u0131 anlataca\\u011f\\u0131m. Bu yaz\\u0131da kullan\\u0131lan Linux server makinesi Ubuntu 20.04 versiyonu y\\u00fckl\\u00fcd\\u00fcr. First, we need to have the root user information of the Linux machine for which we will define a new user. Then we connect to the Linux machine with this information and open the terminal screen.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.etemkeskin.com\/index.php\/2022\/01\/09\/how-to-create-user-account-and-connect-ubuntu-linux-server-using-username-and-password-with-ssh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ana sayfa\",\"item\":\"https:\/\/www.etemkeskin.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create User Account and Connect Ubuntu Linux Server using Username and Password with SSH\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.etemkeskin.com\/#\/schema\/person\/dcbc30282861ce578b96a79ce8789629\",\"name\":\"etemkeskin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.etemkeskin.com\/#personlogo\",\"inLanguage\":\"tr\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6af0148b790691ed24ae245fb3dc773b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6af0148b790691ed24ae245fb3dc773b?s=96&d=mm&r=g\",\"caption\":\"etemkeskin\"},\"url\":\"https:\/\/www.etemkeskin.com\/index.php\/author\/etemkeskinyahoo-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/posts\/2498"}],"collection":[{"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/comments?post=2498"}],"version-history":[{"count":31,"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/posts\/2498\/revisions"}],"predecessor-version":[{"id":2533,"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/posts\/2498\/revisions\/2533"}],"wp:attachment":[{"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/media?parent=2498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/categories?post=2498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.etemkeskin.com\/index.php\/wp-json\/wp\/v2\/tags?post=2498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}