SFTP (SSH File Tran...
 
Share:
Notifications
Clear all

SFTP (SSH File Transfer Protocol)

1 Posts
1 Users
0 Reactions
404 Views
(@kajal)
Posts: 303
Reputable Member
Topic starter
 

SFTP (SSH File Transfer Protocol) is a secure file transfer protocol that operates over the SSH (Secure Shell) protocol. Unlike SCP, which is primarily used for simple file copying, SFTP provides a more robust set of file management capabilities, including the ability to navigate directories, list files, and manage permissions.

Key Features

  • Secure Transfer: Encrypts all data and commands to ensure confidentiality and integrity.
  • Interactive File Management: Allows users to perform a wide range of file operations, such as uploading, downloading, renaming, and deleting files.
  • Resume Capability: Supports resuming interrupted file transfers.
  • Directory Listings: Enables listing of files and directories on the remote server.

Basic Usage

To use SFTP, you typically start an SFTP session with a remote server:

bash


sftp username@remotehost

Once connected, you can use various commands within the SFTP prompt. Here are some common commands:

Common Commands

  1. Upload a file:

    bash
    
    
    put localfile.txt
  2. Download a file:

    bash
    
    
    get remotefile.txt
  3. List files in the current remote directory:

    bash
    
    
    ls
  4. Change remote directory:

    bash
    
    
    cd /path/to/directory
  5. Create a directory:

    bash
    
    
    mkdir new_directory
  6. Delete a file:

    bash
    
    
    rm file_to_delete.txt
  7. Exit the SFTP session:

    bash
    
    
    exit

Security

SFTP is built on SSH, it benefits from the strong security features of SSH, including encrypted connections and secure authentication methods (like passwords and public keys).

 
Posted : 27/10/2024 8:10 am
Share: