{"id":22776,"date":"2021-03-20T13:38:13","date_gmt":"2021-03-20T17:38:13","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/ubuntu-creating-a-user-with-ssh-access-and-write-permission-to-the-web-application-folder-root-by-sayed-ahmed\/"},"modified":"2021-03-20T13:38:13","modified_gmt":"2021-03-20T17:38:13","slug":"ubuntu-creating-a-user-with-ssh-access-and-write-permission-to-the-web-application-folder-root-by-sayed-ahmed","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=22776","title":{"rendered":"Ubuntu: Creating a user with SSH access and write permission to the web-application folder #Root #By Sayed Ahmed"},"content":{"rendered":"<p>Ubuntu: Creating a user with SSH access and write permission to the web-application folder<\/p>\n<p>The following Linux commands helped<\/p>\n<pre><code>sudo chown -R username:username \/home\/username\/.ssh\r\nsudo chmod 0700 \/home\/username\/.ssh\r\nsudo chmod 0600 \/home\/username\/.ssh\/authorized_keys\r\n\r\nAlso, added the following lines into the file \/etc\/ssh\/sshd_config  -&gt; did not check whether these are really \r\nrequired or not. These were placed as part of a different strategy. Should check whether removing these does \r\nchange anything or not. Assuming that these are required. Because such commands were not placed for another \r\nuser, and that user could not login using ssh.\r\n<\/code><\/pre>\n<pre><code>Port 1234\r\nPermitRootLogin no\r\nAllowUsers testuser<\/code><\/pre>\n<pre><code>\r\nReference: http:\/\/askubuntu.com\/questions\/16650\/create-a-new-ssh-user-on-ubuntu-server\r\n\r\n<strong>Step by Step:<\/strong>\r\n\r\n<strong>Create user:<\/strong>\r\n<\/code><code>sudo useradd -d \/home\/testuser -m testuser\r\n<\/code><\/pre>\n<pre><code><strong>Assign Password:<\/strong>\r\nsudo passwd testuser\r\n\r\nYou may or may not need to use sudo based on the permission for your userid.\r\n\r\n<strong>Then use similar commands as below. Please create folder as required<\/strong>\r\nsudo chown -R username:username \/home\/username\/.ssh\r\nsudo chmod 0700 \/home\/username\/.ssh\r\nsudo chmod 0600 \/home\/username\/.ssh\/authorized_keys\r\n\r\n<strong>If still does not work, add these lines in your \/etc\/ssh\/sshd_config file (use: nano \/etc\/ssh\/sshd_config)<\/strong>\r\n<\/code><\/pre>\n<pre><code>Port 1234\r\nPermitRootLogin no\r\nAllowUsers testuser<\/code><\/pre>\n<p> From: http:\/\/sitestree.com\/?p=1427<br \/> Categories:Root, By Sayed Ahmed<br \/>Tags:<br \/> Post Data:2014-08-20 19:43:53<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu: Creating a user with SSH access and write permission to the web-application folder The following Linux commands helped sudo chown -R username:username \/home\/username\/.ssh sudo chmod 0700 \/home\/username\/.ssh sudo chmod 0600 \/home\/username\/.ssh\/authorized_keys Also, added the following lines into the file \/etc\/ssh\/sshd_config -&gt; did not check whether these are really required or not. These were placed &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=22776\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-22776","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":24079,"url":"http:\/\/bangla.sitestree.com\/?p=24079","url_meta":{"origin":22776,"position":0},"title":"Configure a Cisco Switch for SSH Access -Part 3 username &amp; ssh client #Root","author":"Author-Check- Article-or-Video","date":"April 5, 2021","format":false,"excerpt":"From: http:\/\/sitestree.com\/?p=3055 Categories:RootTags: Post Data:2015-10-27 04:09:37 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com http:\/\/SitesTree.com 8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) Shop Online: https:\/\/www.ShopForSoul.com\/ Medium: https:\/\/medium.com\/@SayedAhmedCanada","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67791,"url":"http:\/\/bangla.sitestree.com\/?p=67791","url_meta":{"origin":22776,"position":1},"title":"Misc. on AWS, Linux, Git, SSH, Development Platform #By Sayed Ahmed #Misc. Reading #RHCSA","author":"Author-Check- Article-or-Video","date":"July 28, 2021","format":false,"excerpt":"Restart MySQL server on MacOS https:\/\/coolestguidesontheplanet.com\/start-stop-mysql-from-the-command-line-terminal-osx-linux\/ Ubuntu: http:\/\/askubuntu.com\/questions\/82374\/how-do-i-start-stop-mysql-server Macos: sudo apachectl start Redhat: https:\/\/access.redhat.com\/documentation\/en-US\/Red_Hat_Enterprise_Linux\/6\/html\/Managing_Confined_Services\/chap-Managing_Confined_Services-MySQL.html SSH, Secure copy (SCP), Sync (rsync) with Amazon AWS (Sure I did work with and used the following concepts) Sure, did configure development and deployment platform on AWS This works: ssh -i \/path\/my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com you might\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/PLUA7SYgJYDFqYR7YRow8cwX_RSgTJPCQH\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":78585,"url":"http:\/\/bangla.sitestree.com\/?p=78585","url_meta":{"origin":22776,"position":2},"title":"SSH","author":"Author-Check- Article-or-Video","date":"November 4, 2025","format":false,"excerpt":"From AI tools as is \ud83d\udd10 Understanding SSH (Secure Shell): How It Works and Why It Matters When you connect to a remote server or transfer files securely over the internet, you\u2019re likely using SSH \u2014 Secure Shell. SSH has become the standard protocol for secure communication between computers, system\u2026","rel":"","context":"In &quot;Computer Networks&quot;","block_context":{"text":"Computer Networks","link":"http:\/\/bangla.sitestree.com\/?cat=1978"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67602,"url":"http:\/\/bangla.sitestree.com\/?p=67602","url_meta":{"origin":22776,"position":3},"title":"Experiment with SSH and TCP Wrappers #DevOps","author":"Author-Check- Article-or-Video","date":"July 25, 2021","format":false,"excerpt":"The idea was : use two servers; server1, and server2 create user: user1 in both server1 and server2 use nmtui to assign IP Addresses to both use ifdown and ifup to check if IPs are assigned properly change \/etc\/hosts and add the server ips and names use ping to know\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14027,"url":"http:\/\/bangla.sitestree.com\/?p=14027","url_meta":{"origin":22776,"position":4},"title":"SSH\/SSHD\/OpenSSH in CentOS\/Redhat Linux","author":"Sayed","date":"December 24, 2017","format":false,"excerpt":"Experiment with SSH\/SSHD\/OpenSSH in CentOS\/Redhat Linux Yes, from\u00a0 my history (Probably a review for the technical people, who already knew these sometimes in the past) 461 echo \"dec 24th, 2017\" 462 vim \/etc\/ssh\/sshd_config 463 echo \"SSH Related Commands\" 464 scp -> secure copy 465 tscp -> secure copy for windows\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21831,"url":"http:\/\/bangla.sitestree.com\/?p=21831","url_meta":{"origin":22776,"position":5},"title":"Some Ubuntu Linux Commands used in AWS platform #Unix\/Linux #RHCSA","author":"Author-Check- Article-or-Video","date":"March 7, 2021","format":false,"excerpt":"Some Ubuntu Linux Commands used in AWS platform Some might be run by the parent commands This is kinda cleaned up from .bash_history (removed repeating and sensitive commands), still not perfectly cleaned up - so you will see lots of ls, cd, dir or similar \u00a0 sudo apt-get update sudo\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/22776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22776"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/22776\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22776"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}