{"id":2767,"date":"2016-10-15T19:06:27","date_gmt":"2016-10-15T17:06:27","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=2767"},"modified":"2020-10-05T21:12:35","modified_gmt":"2020-10-05T19:12:35","slug":"sftp-versus-ftps-best-protocol-for-secure-ftp","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=2767","title":{"rendered":"SFTP versus FTPS &#8211; Best protocol for secure FTP"},"content":{"rendered":"<p>The two mainstream protocols available for Secure FTP transfers are named SFTP (FTP over SSH) and FTPS (FTP over SSL).\u00a0Both SFTP and FTPS offer a high level of protection since they implement strong algorithms such as AES and Triple DES to encrypt any data transferred.\u00a0Both options also support a wide variety of functionality with a broad command set for transferring and working with files. So the most notable differences between SFTP and FTPS is how connections are authenticated and managed.<\/p>\n<h2><strong><span style=\"text-decoration: underline;\">With SFTP (FTP over SSH)<\/span><\/strong><\/h2>\n<p><strong><\/strong>A connection can be authenticated using a couple different techniques.\u00a0 For basic authentication, you (or your trading partner) may just require a user id and password to connect to the SFTP server. Its important to note that any user ids and passwords supplied over the SFTP connection will be encrypted, which is a big advantage over standard FTP.<\/p>\n<p>SSH keys can also be used to authenticate SFTP connections in addition to, or instead of, passwords. With key-based authentication, you will first need to generate a SSH private key and public key beforehand.\u00a0If you need to connect to a trading partner&#8217;s SFTP server, you would send your SSH public key to them, which they will load onto their server and associate with your account.\u00a0When you connect to their SFTP server, your client software will transmit your public key to the server for authentication. If the keys match, along with any user\/password supplied, then the authentication will succeed.<\/p>\n<h2><span style=\"text-decoration: underline;\">With FTPS (FTP over SSL)<\/span><\/h2>\n<p>A connection is authenticated using a user id, password and certificate(s).\u00a0 Like SFTP, the users and passwords for FTPS connections will also be encrypted. When connecting to a trading partner&#8217;s FTPS server, your FTPS client will first check if the server&#8217;s certificate is trusted.\u00a0The certificate is considered trusted if either the certificate was signed off by a known certificate authority (CA), like Verisign, or if the certificate was self-signed (by your partner) and you have a copy of their public certificate in your trusted key store.<\/p>\n<p>Your partner may also require that you supply a certificate when you connect to them.\u00a0 Your certificate may be signed off by a 3<sup>rd<\/sup> party CA or your partner may allow you to just self-sign your certificate, as long as you send them the public portion of your certificate beforehand (which they will load in their trusted key store).<\/p>\n<p>In regards to how easy each of the secure FTP protocols are to implement, SFTP is the clear winner since it is very firewall friendly.\u00a0SFTP only needs a single port number (default of 22) to be opened through the firewall.\u00a0 This port will be used for all SFTP communications, including the initial authentication, any commands issued, as well as any data transferred.<\/p>\n<p>On the other hand, FTPS can be very difficult to patch through a tightly secured firewall since FTPS uses multiple port numbers.\u00a0The initial port number (default of 21) is used for authentication and passing any commands.\u00a0 However, every time a file transfer request\u00a0(get, put) or directory listing request is made, another port number needs to be opened.\u00a0 You and your trading partners will therefore have to open a range of ports in your firewalls to allow for FTPS connections, which can be a security risk for your network.<\/p>\n<p>In summary, SFTP and FTPS are both very secure with strong authentication options.\u00a0 However since SFTP is much easier to port through firewalls, and we are seeing an increasing percentage of trading partners adopting SFTP, I believe SFTP is the clear winner for your secure FTP needs.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Related Articles :<\/strong><\/span><\/p>\n<p>http:\/\/www.it-connect.fr\/quelle-est-la-difference-entre-ftps-et-sftp\/<br \/>\nhttp:\/\/pureftpd.sourceforge.net\/README.TLS<br \/>\nhttp:\/\/how2ssl.com\/articles\/working_with_pem_files\/<br \/>\nhttp:\/\/how2ssl.com\/articles\/openssl_commands_and_tips\/<br \/>\nhttps:\/\/www.howtoforge.com\/how-to-configure-pureftpd-to-accept-tls-sessions-on-ubuntu-10.10<br \/>\nhttp:\/\/supergeekery.com\/geekblog\/comments\/automate-daily-database-backups-with-crontab-and-sftp<br \/>\nhttp:\/\/unix.stackexchange.com\/questions\/166542\/transferring-data-between-servers<br \/>\nhttp:\/\/superuser.com\/questions\/144198\/how-to-create-a-cron-job-to-upload-files-to-an-ftp-server<br \/>\nhttp:\/\/serverfault.com\/questions\/254627\/how-to-convert-a-cer-file-in-pem<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The two mainstream protocols available for Secure FTP transfers are named SFTP (FTP over SSH) and FTPS (FTP over SSL).\u00a0Both SFTP and FTPS offer a high level of protection since they implement strong algorithms&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2843,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,1],"tags":[],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/2767"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2767"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/2767\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2843"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}