{"id":54,"date":"2007-07-11T15:52:43","date_gmt":"2007-07-11T13:52:43","guid":{"rendered":"http:\/\/henry78.at\/tech\/sftp-without-chroot\/"},"modified":"2007-07-11T15:52:43","modified_gmt":"2007-07-11T13:52:43","slug":"sftp-without-chroot","status":"publish","type":"post","link":"https:\/\/henry78.at\/?p=54","title":{"rendered":"SFTP without chroot"},"content":{"rendered":"<p>Today I needed to configure a sftp server as replacement for the standard ftpd. I was shocked as alomst any documentation can be found via google. But it&#8217;s rather simple so here&#8217;s what I&#8217;ve done on AIX:<\/p>\n<p><strong>Install openssh<\/strong> (have a look at the <a TITLE=\"IBM LinuxToolbox\" HREF=\"http:\/\/www-1.ibm.com\/servers\/aix\/products\/aixos\/linux\/download.html\">IBM LinuxToolbox<\/a>), sftp should be activated per default. Check <code>\/etc\/ssh\/sshd_config<\/code> for the line <code>http:\/\/www-1.ibm.com\/servers\/aix\/products\/aixos\/linux\/download.html<code><\/code><\/code><\/p>\n<p>Now you have to <strong>configure sftp-server as login-command<\/strong>:<\/p>\n<ul>\n<li> add <code>\/usr\/sbin\/sftp-server<\/code> as allowed login shell to <code>\/etc\/security\/login.cfg<\/code><\/li>\n<li> assign sftp-server as login-command to the sftp-user<\/li>\n<blockquote>\n<ul>\n<li>per smit: look for <code>Initial PROGRAM<\/code><\/li>\n<li>manually: edit <code>\/etc\/passwd<\/code>, so the sftp-users line looks like<br \/>\n<code>sftp-user:!:1010:1010:mailto.sftp@localhost:\/home\/sftp:\/usr\/sbin\/sftp-server<\/code><\/li>\n<\/ul>\n<\/blockquote>\n<li> If you changed the <code>sshd_config<\/code> restart the sshd-subsystem:<br \/>\n<code><br \/>\nstopsrc -s sshd<br \/>\nstartsrc -s sshd<br \/>\n<\/code><\/li>\n<\/ul>\n<p>That&#8217;s it! The sftp-user should be able to login via sftp, like <code>sftp sftp-user@localhost<\/code> and end up in its home-directory with no shell, just sftp.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I needed to configure a sftp server as replacement for the standard ftpd. I was shocked as alomst any documentation can be found via google. But it&#8217;s rather simple so here&#8217;s what I&#8217;ve done on AIX: Install openssh (have a look at the IBM LinuxToolbox), sftp should be activated per default. Check \/etc\/ssh\/sshd_config for &hellip; <a href=\"https:\/\/henry78.at\/?p=54\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SFTP without chroot<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/posts\/54"}],"collection":[{"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}