SFTP - SSH File Transfer Protocol ================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is SFTP?** SFTP stands for SSH File Transfer Protocol (or Secure File Transfer Protocol). It’s a standard network protocol used to transfer files securely between a client and a server over a TCP/IP network, typically using SSH. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the purpose of SFTP?** * Secure file transfers over an encrypted channel. * Remote file management (upload, download, delete, rename, etc.). * Compliance with data protection and privacy standards. * Secure business-to-business (B2B) data exchange. * Widely used in web development, system administration, and automation. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How does it work?** * Client connects to the SFTP server – usually using SSH credentials. * Authentication – Username/password or SSH key-based authentication. * Secure file operations – Upload, download, delete, rename files. * All communication is encrypted using SSH. * The session ends when the client disconnects. * Operates over a single encrypted connection (unlike FTP, which uses separate command/data channels). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is SFTP used?** * Web hosting – Uploading website content securely. * Backup systems – Remote and automated secure backups. * Software distribution – Distributing patches, updates securely. * IT administration – Managing logs and configuration files on servers. * Financial and healthcare sectors – Where secure file exchange is critical. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI Layer does this protocol belong to?** * SFTP operates at the **Application Layer (Layer 7)** of the OSI model. * It uses application-level commands like `GET`, `PUT`, `LIST`, etc. * It runs over **SSH**, which in turn uses **TCP (Layer 4)** for transport. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`SFTP Version&RFC Details ` * :ref:`SFTP Basic Setup on Ubuntu using IPv4 ` * :ref:`SFTP Basic Setup on Ubuntu using IPv6 ` * :ref:`SFTP Protocol Packet Details ` * :ref:`SFTP Usecases ` * :ref:`SFTP Basic Features ` * :ref:`SFTP Feature : Secure Data Transfer ` * :ref:`SFTP Feature : Authentication ` * :ref:`SFTP Feature : File Upload ` * :ref:`SFTP Feature : File Download ` * :ref:`SFTP Feature : Directory Listing ` * :ref:`SFTP Feature : File Rename ` * :ref:`SFTP Feature : File Deletion ` * :ref:`SFTP Feature : Directory Creation ` * :ref:`SFTP Feature : Directory Deletion ` * :ref:`SFTP Feature : File Permissions Management ` * :ref:`SFTP Feature : Resume Interrupted Transfers ` * :ref:`SFTP Feature : File Integrity Verification ` * :ref:`SFTP Feature : Logging and Auditing ` * :ref:`SFTP Feature : Cross-Platform Compatibility ` * :ref:`SFTP Feature : Firewall-Friendly` * :ref:`SFTP Feature : Compression Support` * :ref:`SFTP Feature : Symbolic Link Handling` * :ref:`SFTP Feature : Atomic Operations` * :ref:`SFTP Feature : Session Management ` * :ref:`SFTP Feature : Integration with SSH ` * :ref:`Reference links ` .. _SFTP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _SFTP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _SFTP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _SFTP_step5: .. tab-set:: .. tab-item:: SFTP Version&RFC Details .. csv-table:: :file: ./SFTP/SFTP_RFC_Details.csv :widths: 1,10,10,10,30 :header-rows: 1 .. _SFTP_step29: .. tab-set:: .. tab-item:: SFTP Basic Setup on Ubuntu using IPv4 * Setup .. _SFTP_step30: .. tab-set:: .. tab-item:: SFTP Basic Setup on Ubuntu using IPv6 * Setup .. _SFTP_step6: .. tab-set:: .. tab-item:: SFTP Protocol Packet Details **SFTP INIT Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_1.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP VERSION Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_2.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP OPEN Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_3.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP READ Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_4.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP DATA Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_5.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP WRITE Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_6.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP CLOSE Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_7.csv :widths: 10,20,30,10 :header-rows: 1 **SFTP STATUS Packet** .. csv-table:: :file: ./SFTP/SFTP_Protocol_Packet_8.csv :widths: 10,20,30,10 :header-rows: 1 .. _SFTP_step7: .. tab-set:: .. tab-item:: SFTP Usecases .. csv-table:: :file: ./SFTP/SFTP_Usecases.csv :widths: 10,20,30 :header-rows: 1 .. _SFTP_step8: .. tab-set:: .. tab-item:: SFTP Basic Features .. csv-table:: :file: ./SFTP/SFTP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _SFTP_step9: .. tab-set:: .. tab-item:: SFTP Feature : Secure Data Transfer **Secure Data Transfer - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_1_Secure_Data_Transfer_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step10: .. tab-set:: .. tab-item:: SFTP Feature : Authentication **Authentication, - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_2_Authentication_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step11: .. tab-set:: .. tab-item:: SFTP Feature : File Upload **File Upload - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_3_File_Upload_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step12: .. tab-set:: .. tab-item:: SFTP Feature : File Download **File Download - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_4_File_Download_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step13: .. tab-set:: .. tab-item:: SFTP Feature : Directory Listing **Directory Listing - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_5_Directory_listing_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step14: .. tab-set:: .. tab-item:: SFTP Feature : File Rename **File Rename - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_6_File_Rename_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step15: .. tab-set:: .. tab-item:: SFTP Feature : File Deletion **File Deletion - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_7_File_Deletion_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step16: .. tab-set:: .. tab-item:: SFTP Feature : Directory Creation **Directory Creation - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_8_Directory_Creation_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step17: .. tab-set:: .. tab-item:: SFTP Feature : Directory Deletion **Directory Deletion - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_9_Directory_Deletion_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step18: .. tab-set:: .. tab-item:: SFTP Feature : File Permissions Management **File Permissions Management - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_10_File_Permission_Management_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step19: .. tab-set:: .. tab-item:: SFTP Feature : Resume Interrupted Transfers **Resume Interrupted Transfers - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_11_Resume_Interrupted_Transfers_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step20: .. tab-set:: .. tab-item:: SFTP Feature : File Integrity Verification **File Integrity Verification - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_12_File_Integrity_Verification_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step21: .. tab-set:: .. tab-item:: SFTP Feature : Logging and Auditing **Logging and Auditing - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_13_Logging_and_Auditing_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step22: .. tab-set:: .. tab-item:: SFTP Feature : Cross-Platform Compatibility **Cross-Platform Compatibility - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_14_Cross_Plateform_Compatibility_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step23: .. tab-set:: .. tab-item:: SFTP Feature : Firewall-Friendly **Firewall-Friendly - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_15_Firewall_Friendly_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step24: .. tab-set:: .. tab-item:: SFTP Feature : Compression Support **Compression Support - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_16_Compression_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step25: .. tab-set:: .. tab-item:: SFTP Feature : Symbolic Link Handling **Symbolic Link Handling - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_17_Symbolic_Link_Handling_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step26: .. tab-set:: .. tab-item:: SFTP Feature : Atomic Operations **Atomic Operations - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_18_Atomic_Operations_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step27: .. tab-set:: .. tab-item:: SFTP Feature : Session Management **Session Management - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_19_Session_Management_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step28: .. tab-set:: .. tab-item:: SFTP Feature : Integration with SSH **Integration with SSH - Testcases** .. csv-table:: :file: ./SFTP/SFTP_Feature_20_Integration_with_SSH_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _SFTP_step31: .. tab-set:: .. tab-item:: Reference links * Reference links