SFTP

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 12:55, 1 May 2023 by Admin (Talk | contribs)

Jump to: navigation, search

SFTP is SSH File Transfer Protocol, however, they don't call it SSHFTP so some assume it merely is Secure File Transfer Protocol.

SFTP relaces FTPS (how confusing is that?) which was an early attempt to make FTP more secure. Neither "replace" FTP as there are situations where it is not necessary to encrypt a file transfer. Any source that calls either a replacement for FTP is in error.

SFTP (SSH File Transfer Protocol) is a secure file transfer protocol. It runs over the SSH protocol. It supports the full security and authentication functionality of SSH. The SFTP protocol runs over the SSH protocol as a subsystem.

SFTP protects against password sniffing and man-in-the-middle attacks, and protects the integrity of the data using encryption and cryptographic hash functions. Both the host and server require authentication.

The sftp command in Linux is a client program for SFTP. The sftp command line interface was designed to be similar to the ftp command. The sftp command is typically part of the OpenSSH package.

On Linux, SFTP is often used as a command-line utility that supports both interactive and automated file transfers. Public key authentication can be used to fully automate logins for automated file transfers.

sftp cli example 1:

sftp nicolep@192.168.1.10:/home/camerauser/pic.jpg /home/nicolep/Pictures

To initiate an SFTP connection, use sftp command with a username and remote host’s name or IP. Default TCP port 22 should be open for this to work or else explicitly specify the port using -oPort flag.

SSHFS You can mount a remove filesystem locally via SFTP using SSHFS.

SSHFS itself is a file system in user space (FUSE) that uses the SSH File Transfer Protocol (SFTP) to mount a remote file system. The sshfs command is a client tool for using SSHFS to mount a remote file system from another server locally on your machine.