{"id":694,"date":"2015-04-01T13:23:38","date_gmt":"2015-04-01T11:23:38","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=694"},"modified":"2019-02-01T14:01:41","modified_gmt":"2019-02-01T13:01:41","slug":"sftp-with-proftpd-on-centos-6","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=694","title":{"rendered":"SFTP with ProFTPd on CentOS 6"},"content":{"rendered":"<p>OpenSSH is not the only one\u00a0capable of doing file transfers over a secure line called\u00a0SFTP (ShellFTP\/SecureFTP\/SSHFTP). ProFTPd can also do it using mod_sftp and the support has been added on version 1.3.3. Why choose SFTP over FTPS? Simple, SFTP transfers all data over 1 single port!!! This means you do not have to fiddle around with needed passive ports on your firewall setup.<\/p>\n<p>Now here&#8217;s to install and run a separate SFTP server:<\/p>\n<p>1. Download and install the EPEL repo (<a href=\"https:\/\/fedoraproject.org\/wiki\/EPEL#How_can_I_use_these_extra_packages.3F\" target=\"_blank\" rel=\"noopener\">EPEL<\/a>)<\/p>\n<p>2. Install proftpd with:<\/p>\n<pre>yum install proftpd<\/pre>\n<p>3. Then edit your proftpd config file and add following content somewhere in the config file (somewhere at the end i suppose should be best):<\/p>\n<pre>LoadModule mod_sftp.c\n&lt;IfModule mod_sftp.c&gt;\n        SFTPEngine On\n        SFTPHostKey \/etc\/ssh\/ssh_host_rsa_key\n        SFTPLog \/var\/log\/proftpd\/sftp.log\n        SFTPOptions     IgnoreSFTPUploadPerms\n        SFTPClientMatch \".*\" channelWindowSize 256MB<br \/>        SFTPCompression delayed\n&lt;\/IfModule&gt;<\/pre>\n<p>3b. (Optional) Should you want to allow login for users with invalid shells (e.g. \/bin\/false or \/sbin\/nologin), do the following:<\/p>\n<pre>RequireValidShell   off<br \/><span class=\"s1\"># AuthOrder<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0  <\/span>mod_auth_pam.c* mod_auth_unix.c<\/span><\/pre>\n<p>4. start the proftpd server<\/p>\n<pre>service proftpd start<\/pre>\n<p>For more infos about the sftp module visit the <a href=\"http:\/\/www.proftpd.org\/docs\/contrib\/mod_sftp.html\" target=\"_blank\" rel=\"noopener\">manual page<\/a><\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenSSH is not the only one\u00a0capable of doing file transfers over a secure line called\u00a0SFTP (ShellFTP\/SecureFTP\/SSHFTP). ProFTPd can also do it using mod_sftp and the support has been added on version 1.3.3. Why choose SFTP over FTPS? Simple, SFTP transfers all data over 1 single port!!! This means you do not have to fiddle around [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-694","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=694"}],"version-history":[{"count":4,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/694\/revisions"}],"predecessor-version":[{"id":1105,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/694\/revisions\/1105"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}