SSH - Secure Shell ===================== .. 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 SSH?** SSH (Secure Shell) is a cryptographic network protocol used to securely access and manage devices over an unsecured network. It allows users to log into remote systems, execute commands, and transfer files securely. Commonly used by system administrators and developers to manage servers. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is SSH important?** * Security: Encrypts all data, including passwords and commands. * Authentication: Uses passwords or cryptographic keys to verify identity. * Remote Access: Enables secure management of remote machines. * Port Forwarding: Can tunnel other protocols securely. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How SSH works (in simple steps):** * You open an SSH client (like `ssh` in terminal or PuTTY). * You connect to a remote server using its IP address or domain name. * The server and client exchange cryptographic keys. * Once authenticated, you can securely run commands or transfer files. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is SSH used?** * Remote server management * Secure file transfers (via SCP or SFTP) * Automated scripts and DevOps pipelines * Tunneling and port forwarding .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why OSI Layer: Application Layer (Layer 7)?** SSH operates at the Application Layer because: * It directly interacts with user applications (like terminal emulators). * It provides services (like remote login and file transfer) to the user. * It uses lower layers (like TCP at Layer 4) for transport but itself is an application-level protocol. .. 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:`SSH Version&RFC Details ` * :ref:`SSH Basic Setup on Ubuntu using IPv4 ` * :ref:`SSH Basic Setup on Ubuntu using IPv6 ` * :ref:`SSH Protocol Packet Details ` * :ref:`SSH Usecases ` * :ref:`SSH Basic Features ` * :ref:`SSH Feature : Secure Remote Access ` * :ref:`SSH Feature : Authentication Methods ` * :ref:`SSH Feature : Encryption ` * :ref:`SSH Feature : Port Forwarding ` * :ref:`SSH Feature : File Transfer ` * :ref:`SSH Feature : Command Execution ` * :ref:`SSH Feature : Session Management ` * :ref:`SSH Feature : Key Management ` * :ref:`SSH Feature : Access Control ` * :ref:`SSH Feature : Logging & Auditing ` * :ref:`Reference links ` .. _SSH_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _SSH_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _SSH_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _SSH_step5: .. tab-set:: .. tab-item:: SSH Version&RFC Details .. csv-table:: :file: ./SSH/SSH_Version_&_RFC_Details.csv :widths: 10,10,10,30 :header-rows: 1 .. _SSH_step20: .. tab-set:: .. tab-item:: SSH Basic Setup on Ubuntu using IPv4 **Setup** .. _SSH_step21: .. tab-set:: .. tab-item:: SSH Basic Setup on Ubuntu using IPv6 **Setup** .. _SSH_step6: .. tab-set:: .. tab-item:: SSH Protocol Packet Details **SSH Transport Layer Packet** .. csv-table:: :file: ./SSH/SSH_packetdetails1.csv :widths: 10,20,30,10 :header-rows: 1 **SSH Key Exchange Packet** .. csv-table:: :file: ./SSH/SSH_packetdetails2.csv :widths: 10,20,30,10 :header-rows: 1 **SSH User Authentication Packet** .. csv-table:: :file: ./SSH/SSH_packetdetails3.csv :widths: 10,20,30,10 :header-rows: 1 **SSH Connection Protocol Packet** .. csv-table:: :file: ./SSH/SSH_packetdetails4.csv :widths: 10,20,30,10 :header-rows: 1 .. _SSH_step7: .. tab-set:: .. tab-item:: SSH Usecases .. csv-table:: :file: ./SSH/SSH_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _SSH_step8: .. tab-set:: .. tab-item:: SSH Basic Features .. csv-table:: :file: ./SSH/SSH_Basic_Features.csv :widths: 10,10,30 :header-rows: 1 .. _SSH_step9: .. tab-set:: .. tab-item:: SSH Feature : Secure Remote Access **Secure Remote Access - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature1_Secure_Remote_Access_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step10: .. tab-set:: .. tab-item:: SSH Feature : Authentication Methods **Authentication Methods - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature2_Authentication_Methods_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step11: .. tab-set:: .. tab-item:: SSH Feature : Encryption **Encryption - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature3_Encryption_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step12: .. tab-set:: .. tab-item:: SSH Feature : Port Forwarding **Port Forwarding - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature4_Port_Forwarding_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step13: .. tab-set:: .. tab-item:: SSH Feature : File Transfer **File Transfer - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature5_File_Transfer_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step14: .. tab-set:: .. tab-item:: SSH Feature : Command Execution **Command Execution - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature6_Command_Execution_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step15: .. tab-set:: .. tab-item:: SSH Feature : Session Management **Session Management - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature7_Session_Management_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step16: .. tab-set:: .. tab-item:: SSH Feature : Key Management **Key Management - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature8_Key_Management_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step17: .. tab-set:: .. tab-item:: SSH Feature : Access Control **Access Control - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature9_Access_Control_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step18: .. tab-set:: .. tab-item:: SSH Feature : Logging & Auditing **Logging & Auditing - Testcases** .. csv-table:: :file: ./SSH/SSH_Feature10_Logging_and_Auditing_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _SSH_step19: .. tab-set:: .. tab-item:: Reference links * Reference links