Transferring Files Securely Using SFTP

SFTP is a protocol for transferring files using SSH tothe client must enter their passphrase in order to
secure the commands and data that are beingload their private key and complete the
transferred between the client and the server. Whenauthentication process.
using FTP, the data that is being transferred is notKeyboard-interactive authentication uses the method
encrypted, exposing this data to eavesdropping,of asking the client a series of questions, and the
tampering, or message forgery. With SFTP, the dataclient must answer these questions correctly in order
that is transferred between the client and the serverto be authenticated. This allows for the
is encrypted, preventing unauthorized users fromimplementation of assorted authentication methods.
accessing your data.For example, username and password authentication
Components Neededcan be disabled on the server, but
To transfer files using the SFTP protocol, you willkeyboard-interactive authentication could be used to
need a server that is configured for SFTP and aask the client for their username and password.
client that supports it. Popular SFTP servers includeFile Compression
FileZilla, WinSCP, and DataFreeway. The mostMost SFTP Clients provide an option to enable file
commonly used SFTP client is PuTTY, which iscompression. With this option enabled, data sent by
available free of charge. Users who desire a morethe server is compressed before sending, and
intuitive interface may opt for a more user-friendlydecompressed at the client end. Likewise, data sent
client, such as Zephyr's PASSPORT.to the server is compressed first and the server
How SFTP Worksdecompresses it at the other end. This can help to
There are two basic components to file transfer withspeed up file transfers, especially with low-bandwidth
SFTP; server validation and client authentication.connections.
These two components use public and private keysSFTP Versions
for authenticating communication between the clientThere are currently two versions of the SFTP
and the server. The server is validated by comparingprotocol: SSH-1 and SSH-2. SSH-2 is a newer, more
the server's public key with the public keys stored onsecure implementation. SSH-1 contains a known
the client machine. The server's public key is usuallysecurity vulnerability, and SSH-2 is recommended for
contained in a file called "known_hosts" located onoptimum security.
the server, and the client's public key is stored in anSFTP vs FTPS
encrypted file on the local machine.SFTP and FTPS are two entirely different protocols.
Clients can be authenticated in three different ways:- SFTP uses SSH to secure transmissions whereas
- Username and passwordFTPS uses SSL security
- Private key and passphrase- The standard port setting for FTP is 21. The default
- Keyboard-interactive authenticationport for SFTP is 22
With username and password authentication, a userSummary
account is set up on the SFTP server. When usingSFTP should be used when you need to transfer
private key and passphrase authentication, the client'ssensitive or confidential data between a client and a
public key is added to the "authorized_keys" file onserver that is configured to use SSH for secure
the server. Once the server validation has occurred,transactions.