SFTP (Secure File Transfer Protocol)

SFTP (Secure File Transfer Protocol) is a protocol used for transferring files from one machine to another or in between remote servers in a secure manner, meaning that the data being transferred is encrypted. SFTP extend upon FTP (File Transfer Protocol) which does the same job but without SSH (Secure Shell) for a secure connection.

  • SSH: A cryptographic network protocol, which allow users to perform a wide range of network services over a unsecure network. To make use of SSH a pair of keys is needed, namely a public and private key. The public key is then placed anywhere on the server whereas the private key is used on the client side to connect. Once the pairs are matched against each other the system unlocks. 

The idea is then that once a secure connection is established files can be transfered to the server and either processed directly on the server or downloaded by another client which use SFTP as well.



To demonstrate how SFTP works we will walk through the key generation process and then try to connect securely to a remote server using FileZilla.


  1. Start by downloading and installing Putty from the following website: https://www.putty.org/
  2. Navigate to folder in which Putty has been installed and open the application PuttyGen.exe

The PuttyGen application should look similar to the picture below:



3. Click "Generate" to generate a public/private key pair, and remember to have it set to RSA 2048.

Once generated you will see similar screen as below:


4. Then click Save Public key and Save private key for later use. However be sure to protect your private key with a passphrase before saving it. You can do so by entering a password in the field Key passphrase as shown in the picture above.

5. Once the two keys are saved you can upload the public key to your server, normally such is possible through a web host interface depending on where your server is hosted.

6. Open Filezila and select Site manager, Select SFTP as your Protocol and Key File as your Logon type. If you information is filled out correctly you should be able to logon through a secure connection using SFTP. The picture below illustrate a correct configured setting. Remember however to set the host and port to your own server IP.






Kommentarer

Populære opslag fra denne blog

Neuralink - The merging of Brain and Machine

Uber Technology Stack

Python Password Hashing (Bcrypt)