{"id":544,"date":"2013-10-25T20:57:23","date_gmt":"2013-10-25T20:57:23","guid":{"rendered":"http:\/\/vickistan.com\/?p=544"},"modified":"2013-10-25T21:00:53","modified_gmt":"2013-10-25T21:00:53","slug":"creating-multiple-chroots","status":"publish","type":"post","link":"https:\/\/vickistan.com\/?p=544","title":{"rendered":"Creating multiple chroots"},"content":{"rendered":"<p>Edit the \/etc\/ssh\/sshd_config:<\/p>\n<p>1. Comment out the Subsystem sftp line<br \/>\n2. Create line as follows:<br \/>\nSubsystem sftp internal-sftp<br \/>\n3. Add the following at the bottom of the sshd_config file:<br \/>\nMatch Group sftponly<br \/>\n     ChrootDirectory %h<br \/>\n     X11Forwarding no<br \/>\n     AllowTCPForwarding no<br \/>\n     ForceCommand internal-sftp<br \/>\n4. Restart ssh<br \/>\n5. Create a file called create_chroot.sh:<br \/>\nuseradd -d \/home\/contractor3 -s \/bin\/false -G sftponly contractor3<br \/>\nchown root:root \/home\/contractor3\/<br \/>\nchmod 755 \/home\/contractor3\/<br \/>\nmkdir \/home\/contractor3\/upload<br \/>\nchown contractor3:contractor3 \/home\/contractor3\/upload<br \/>\npasswd contractor3<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Edit the \/etc\/ssh\/sshd_config: 1. Comment out the Subsystem sftp line 2. Create line as follows: Subsystem sftp internal-sftp 3. Add the following at the bottom of the sshd_config file: Match Group sftponly ChrootDirectory %h X11Forwarding no AllowTCPForwarding no ForceCommand internal-sftp &hellip; <a href=\"https:\/\/vickistan.com\/?p=544\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-544","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=544"}],"version-history":[{"count":3,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":547,"href":"https:\/\/vickistan.com\/index.php?rest_route=\/wp\/v2\/posts\/544\/revisions\/547"}],"wp:attachment":[{"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vickistan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}