{"componentChunkName":"component---src-templates-manual-template-tsx","path":"/manuals/client-user/44/Forwarding_FTP.html","webpackCompilationHash":"d1750f6cc413894a8b5c","result":{"data":{"promoBlocks":{"edges":[{"node":{"contentful_id":"47glnSpWzXeFylv2vfQEF8","internal":{"type":"ContentfulPromotionBlock"},"title":{"internal":{"type":"ContentfulHeading"},"contentful_id":"7KIOfSfgwJnCXuvRN6CfrP","textContent":"Standing privileges are a risk with PAM","color":"black","size":"medium"},"subTitle":null,"content":{"nodeType":"document","internal":{"content":"{\"nodeType\":\"document\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"content\":[{\"nodeType\":\"text\",\"value\":\"Start your journey towards a just-in-time (JIT) model with zero standing privileges (ZSP). Read 'Remove Standing Privileges Through a Just-In-Time PAM Approach' by Gartner , courtesy of SSH.COM.\\n \\n\",\"marks\":[],\"data\":{}}],\"data\":{}}]}"}},"callToAction":{"internal":{"type":"ContentfulButton"},"contentful_id":"19EUesynV2Z7HHcuJk0BAS","content":"Download Gartner research","internalLink":null,"externalLink":"https://info.ssh.com/gartner_research_privileged_access_management","assetLink":null,"anchor":null},"picture":{"internal":{"type":"ContentfulAsset"},"contentful_id":"2ClylmBswcfDx4XdO7NTmL","title":"ICON Gartner ZSP","description":"","file":{"url":"//images.ctfassets.net/0lvk5dbamxpi/2ClylmBswcfDx4XdO7NTmL/78e899153ed66aec3b03b9a2cacd112d/ICON_Gartner_ZSP_ICON_Gartner.png","contentType":"image/png"},"fluid":{"aspectRatio":1,"src":"//images.ctfassets.net/0lvk5dbamxpi/2ClylmBswcfDx4XdO7NTmL/78e899153ed66aec3b03b9a2cacd112d/ICON_Gartner_ZSP_ICON_Gartner.png?w=3000&q=50","srcSet":"//images.ctfassets.net/0lvk5dbamxpi/2ClylmBswcfDx4XdO7NTmL/78e899153ed66aec3b03b9a2cacd112d/ICON_Gartner_ZSP_ICON_Gartner.png?w=750&h=750&q=50 750w,\n//images.ctfassets.net/0lvk5dbamxpi/2ClylmBswcfDx4XdO7NTmL/78e899153ed66aec3b03b9a2cacd112d/ICON_Gartner_ZSP_ICON_Gartner.png?w=1500&h=1500&q=50 1500w,\n//images.ctfassets.net/0lvk5dbamxpi/2ClylmBswcfDx4XdO7NTmL/78e899153ed66aec3b03b9a2cacd112d/ICON_Gartner_ZSP_ICON_Gartner.png?w=1601&h=1601&q=50 1601w","sizes":"(max-width: 3000px) 100vw, 3000px"},"fixed":{"width":3000,"height":3000,"src":"//images.ctfassets.net/0lvk5dbamxpi/2ClylmBswcfDx4XdO7NTmL/78e899153ed66aec3b03b9a2cacd112d/ICON_Gartner_ZSP_ICON_Gartner.png?w=3000&q=50","srcSet":""}},"centered":true,"indentMainContent":null,"transparentBackground":null,"imageScale":70,"imagePadding":null,"name":"WIKI migration side promo block2","product":null,"funnel":null,"topic":null,"keywords":null,"type":null,"priority":null,"globalOverride":null}},{"node":{"contentful_id":"6dfNaA1UlY4bADKQk6awhs","internal":{"type":"ContentfulPromotionBlock"},"title":{"internal":{"type":"ContentfulHeading"},"contentful_id":"49Tb2wSR21P5C2cpcgMZ3","textContent":"Get Multi-cloud PAM software - for free!","color":"black","size":"medium"},"subTitle":null,"content":{"nodeType":"document","internal":{"content":"{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"PrivX® Free replaces your in-house jump hosts and combines your AWS, GCP and Azure access into one multi-cloud solution.\\n \\n\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"document\"}"}},"callToAction":{"internal":{"type":"ContentfulButton"},"contentful_id":"1dmQ13jyyZ46ID07eVNVFb","content":"PrivX Free","internalLink":null,"externalLink":"https://info.ssh.com/privx-free-access-management-software","assetLink":null,"anchor":null},"picture":{"internal":{"type":"ContentfulAsset"},"contentful_id":"4UUYdjING8micwZQur5o6d","title":"ICON computer (search)","description":"","file":{"url":"//images.ctfassets.net/0lvk5dbamxpi/4UUYdjING8micwZQur5o6d/1b378a0f4646075c7a4788f1afffbabe/ICON_computer__search_.svg","contentType":"image/svg+xml"},"fluid":{"aspectRatio":null,"src":null,"srcSet":null,"sizes":null},"fixed":{"width":null,"height":null,"src":null,"srcSet":null}},"centered":true,"indentMainContent":null,"transparentBackground":null,"imageScale":70,"imagePadding":null,"name":"WIKI migration side promo block1","product":null,"funnel":null,"topic":null,"keywords":null,"type":null,"priority":null,"globalOverride":null}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"body":"<div text=\"#303030\" vLink=\"#006a6e\" aLink=\"#006a6e\" link=\"#006a6e\" bgColor=\"#ffffff\" leftMargin=\"0\" topMargin=\"0\" marginheight=\"0\" marginwidth=\"0\">\n\n<!-- header -->\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"header\">\n  <tbody><tr bgColor=\"#006a6e\" valign=\"top\">\n    <td width=\"324\"><A href=\"http://www.ssh.com/\"><img src=\"gfx/header_logo.gif\" alt=\"SSH Tectia\" width=\"324\" height=\"44\" border=\"0\"></td>\n    <td width=\"451\">\n      <!-- tools -->\n      &nbsp;\n      <!-- /tools -->\n    </td>\n    <td width=\"100%\"><img src=\"gfx/1x1.gif\" width=\"10\" height=\"1\" alt=\"\" border=\"0\"></td>\n  </tr></tbody>\n</table>\n<!-- /header -->\n\n<!-- navi level 1 -->\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n  <tbody><tr valign=\"top\">\n    <td width=\"178\"><img src=\"gfx/navi1_left.gif\" alt=\"\" width=\"178\" height=\"26\" border=\"0\"></td>\n\n    <td width=\"100%\">\n      <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n        <tbody><tr>\n          <td width=\"100%\" bgcolor=\"#1a797d\" background=\"gfx/navi1_bg.gif\"><img src=\"gfx/1x1.gif\" height=\"26\" alt=\"\" border=\"0\"></td>\n        </tr></tbody>\n      </table>\n    </td>\n  </tr></tbody>\n</table>\n<!-- /navi level 1 -->\n\n<!-- navi level 2 -->\n<img src=\"gfx/1x1.gif\" width=\"1\" height=\"5\" alt=\"\" border=\"0\">\n\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"740\" border=\"0\">\n<tr>\n<td width=\"540\">\n</tr>\n<!-- /navi level 2 -->\n\n<IMG height=\"21\" alt=\"\" src=\"gfx/1x1.gif\" width=\"1\" border=\"0\" > \n\n<TABLE cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" border=\"0\" >\n  <TBODY>\n  <TR valign=\"top\">\n    <TD width=\"99\"><IMG height=\"1\" alt=\"\" src=\"gfx/1x1.gif\" width=\"99\" border=\"0\" ></TD>\n    <TD width=\"90%\">\n        <TABLE cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" border=\"0\" >\n        <TBODY>\n        <TR valign=\"top\">\n          <TD width=\"100%\">\n<!-- main column -->\n\n<font face=\"Arial,Helvetica,sans-serif\">\n<table width=\"100%\"><tr><td valign=\"bottom\"><a href=\"Configuring_the_FTP_Client.html\"><img align=\"center\" border=\"0\" src=\"gfx/prev.gif\" alt=\"Previous\"></a>\n<a href=\"GUI_Reference.html\"><img align=\"center\" border=\"0\" src=\"gfx/next.gif\" alt=\"Next\"></a>\n<a href=\"How_to_Set_Up_Tunneling_for_FTP.html\"><img align=\"center\" border=\"0\" src=\"gfx/up.gif\" alt=\"Up\"></a>\n<font face=\"Arial,Helvetica,sans-serif\" size=\"2\">[<a href=\"index.html\">Contents</a>]\n[<a href=\"index-25.html\">Index</a>]\n</font></td><td align=\"right\"></td></tr></table>\n<p>\n<table align=\"right\" cellpadding=\"5\"cellspacing=\"5\"><tr><td bgcolor=\"#C3DBDD\"><font face=\"Arial,Helvetica,sans-serif\" size=\"-2\">\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"About_This_Document.html\">About This Document</a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"Installing_SSH_Tectia_Client.html\">Installing SSH Tectia Client </a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"getting_started.html\">Getting Started </a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"configuration.html\">Configuring SSH Tectia Client </a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"connecting_to_a_remote_host_computer.html\">Connecting to a Remote Host Computer</a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"Transferring_Files.html\">Transferring Files</a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"tunneling-2.html\">Tunneling Applications</a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"How_to_Set_Up_Tunneling_for_E-Mail.html\">How to Set Up Tunneling for E-Mail </a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"How_to_Set_Up_Tunneling_for_FTP.html\">How to Set Up Tunneling for FTP </a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"Configuring_SSH_Tectia_Client-2.html\">Configuring SSH Tectia Client</a><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"Configuring_the_FTP_Client.html\">Configuring the FTP Client</a><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#303030\">Forwarding FTP</font><br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"GUI_Reference.html\">GUI Reference</a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"troubleshooting.html\">Troubleshooting </a>&gt;&gt;<br>\n&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"Command-Line_Tools.html\">Command-Line Tools </a>&gt;&gt;<br>\n</font>\n</td></tr></table>\n\n<h2> <!-- FILENAME:  -->  Forwarding FTP<a name=\"indexdef-622\"></a></h2>\n\n<p> <a name=\"indexdef-623\"></a>\n<a name=\"indexdef-624\"></a>\n\n\n<p> FTP forwarding is an extension to the generic port forwarding mechanism. \nThe FTP control channel can be secured by using generic port forwarding, \nbut since the FTP protocol requires creating separate TCP connections \nfor the files to be transferred, all the files would be transferred \nunencrypted when using generic port forwarding, as these separate TCP \nconnections would not be forwarded automatically.\n\n<p> To protect also the transferred files, use FTP forwarding instead. It \nworks similarly to generic port forwarding, except that the FTP \nforwarding code monitors the forwarded FTP control channel and \ndynamically creates new port forwardings for the data channels as they \nare requested. \n\n<p> TCP port 21 is the port the client uses to establish a connection with \nthe remote server for an FTP session.  The TCP port locally assigned to \nthe client is always going to be different since it is only used as a \nmethod to ensure the FTP server traffic is sent back to the appropriate \nmachine. \n\n<p> This is important in situations where multiple users may be using FTP to \ntransfer files to the same server. If the users' machines are sitting \nbehind a NAT device such as a firewall, all packets coming to the server \nwill look as though they are from the same machine. The dynamic port \nnumbers assigned to each client enable the firewall to route the return \npackets to the correct user.\n\n<p> To see exactly how this dynamically created port forwarding is done, two \ndifferent cases need to be examined: the active mode and the passive \nmode of the FTP protocol.\n\n<p> \n\n<h3>  FTP in Passive Mode<a name=\"indexdef-625\"></a></h3>\n\n<p> <a name=\"indexdef-626\"></a>\n\n\n<p> In passive mode, the FTP client sends the command <code>PASV</code> to the \nserver, which reacts by opening a listener port for the data channel and \nsending the IP address and port number of the listener as a reply to the \nclient. The reply is of the format <code>227 Entering Passive Mode (10,1,60,99,6,12)</code>.\n\n<p> When the Secure Shell client notices the reply to the <code>PASV</code> \ncommand, it creates a local port forwarding to the destination mentioned \nin the reply. After this, the client rewrites the IP address and port in \nthe reply to point to the listener of the newly created local port \nforwarding (which exists always in a <code>localhost</code> address, 127.0.0.1) and \npasses the reply to the FTP client. The FTP client opens a data channel \nbased on the reply, effectively tunneling the data through the SSH \nconnection, to the listener that the FTP server has opened. The net \neffect is that the data channel is secure all the way except from the \nSecure Shell server to the FTP server, if they are on different \nmachines. This sequence of events takes place automatically for every \ndata channel.\n\n<p> Since port forwarding is opened to a <code>localhost</code> address, the FTP \nclient must be run on the same machine as the Secure Shell client if \npassive mode is used.\n\n<p> \n\n<h3>  FTP in Active Mode<a name=\"indexdef-627\"></a></h3>\n\n<p> <a name=\"indexdef-628\"></a>\n\n\n<p> In active mode, the FTP client creates a listener on a local port for a \ndata channel from the FTP server to the FTP client, and requests the \nchannel by sending the IP address and the port number to the FTP server \nin a command of the following format: <code>PORT 10,1,60,99,6,12</code>. The \nSecure Shell client intercepts this command and creates a remote port \nforwarding from the Secure Shell server <code>localhost</code> address to \nthe address and port specified in the <code>PORT</code> command.\n\n<p> After creating the port forwarding, the Secure Shell client rewrites the \naddress and port in the <code>PORT</code> command to point to the newly \nopened remote forwarding on the Secure Shell server and sends it to the \nFTP server. Now the FTP server opens a data channel to the address and \nport in the <code>PORT</code> command, effectively forwarding the data \nthrough the SSH connection. The Secure Shell client passes the incoming \ndata to the original listener created by the FTP client. The net effect \nis that the data channel is secure the whole way except from the Secure \nShell client to the FTP client. This sequence of events takes place \nautomatically for every data channel.\n\n<p> Since port forwarding is made to a <code>localhost</code> address on the \nSecure Shell client machine, the FTP client must be run on the same host \nas the Secure Shell client if passive mode is used.\n\n<p> Where end-to-end encryption of FTP data channels is desired, the FTP \nserver and Secure Shell server need to reside on the same host, and the \nFTP client and the Secure Shell client will likewise need to reside on \nthe same host. If this is the case, both active or passive mode can be \nused.\n\n<p> <b>Note:</b> Consider using <code>sftp2</code> or <code>scp2</code> (see <a href=\"Synopsis-2.html#SSH2WINCLIENT-SCP2SYNTAX\">SCP2 Syntax</a>) instead of FTP forwarding to secure file \ntransfers. It will require less configuration than FTP forwarding, since \nthe server already has <code>sftp-server2</code> as a subsystem, and \n<code>sftp2</code> and <code>scp2</code> clients are included in the \ndistribution. \n\n<p> \n\n</font><font face=\"Arial,Helvetica,sans-serif\" size=\"-2\">\n<p>\n<a href=\"Configuring_the_FTP_Client.html\"><img align=\"center\" border=\"0\" src=\"gfx/prev.gif\" alt=\"Previous\"></a>\n<a href=\"GUI_Reference.html\"><img align=\"center\" border=\"0\" src=\"gfx/next.gif\" alt=\"Next\"></a>\n<a href=\"How_to_Set_Up_Tunneling_for_FTP.html\"><img align=\"center\" border=\"0\" src=\"gfx/up.gif\" alt=\"Up\"></a>\n<font face=\"Arial,Helvetica,sans-serif\" size=\"2\">[<a href=\"index.html\">Contents</a>]\n[<a href=\"index-25.html\">Index</a>]\n</font><center>\n<hr width=\"100%\">\n[ <a href=\"Contact_Information.html\">Contact Information</a> | <a href=\"http://www.ssh.com/support/\">Support</a> | <a href=\"http://www.ssh.com/company/contact/feedback.mpl\">Feedback</a> | <a href=\"http://www.ssh.com\">SSH Home Page</a> | <a href=\"http://www.ssh.com/products/\">SSH Products</a> ]\n<p>\nCopyright &copy; 2010 SSH Communications Security Corp.<br>\nThis software is protected by international copyright laws. All rights reserved.<br>\n<a href=\"Copyright_Notice.html\">Copyright Notice</a>\n</font>\n</center>\n</font>\n\n<!-- /main column -->\n          </TD>\n          <TD width=\"20\"><IMG height=\"1\" alt=\"\" src=\"gfx/1x1.gif\" width=\"20\" border=\"0\"></TD>\n\t</TR>\n\t</TBODY>\n\t</TABLE>\n\n</TR>\n</TBODY>\n</TABLE>\n\n<!--<IMG height=\"21\" alt=\"\" src=\"gfx/1x1.gif\" width=\"1\" border=\"0\"> -->\n\n</div>","head":"<HEAD>\n<TITLE>SSH: Forwarding FTP</TITLE>\n<META http-equiv=\"Content-Type\" content=\"text/html\"; charset=\"iso-8859-1\">\n<LINK href=\"gfx/ssh.css\" type=\"text/css\" rel=\"stylesheet\">\n</HEAD>","url":"/manuals/client-user/44/Forwarding_FTP.html"}}}