How to use FTP and SPFTP client to upload and download files from a remote server


What is FTP and SFTP?

FTP stands for File Transfer Protocol and is a commonly used protocol for file access, file transfer and file management.

SFTP stands for SSH File Transfer Protocol and it provides file access, file transfer and file management functionality similar to FTP but allows all these operations over SSH and therefore it is more secure.


FTP, SFTP Client

The FTP, SFTP Client is a computer program that must be installed on our local computer which enables file transfer and other file operations between our local machine and remote server.

We will be using WinSCP as our FTP client, SFTP Client. WinSCP is an open source and free FTP client, SFTP client for Windows.

You can download WinSCP Client from here

If you are not using Windows then you can use Filezilla which is a free FTP solution.

You can download Filezilla Client from here


Downloading and Installing WinSCP

  1. Download WinSCP Client from here

  2. Run the WinSCP installer to install WinSCP

  3. In the Setup Wizard, select Typical installation which is recommended

  4. In the user interface option, select Explorer as it is an easier interface to start as a beginner

  5. Finally complete the entire installation

Now we have WinSCP installed.

If you just want to connect using FTP then you do not need to generate public/private keys.

But if you want to connect using SFTP then you need to generate public/private keys and store the public key on the remote server for connecting to the server over SSH.

For all these things we can use a program such as PuTTY or use Command Prompt if you are on Windows 10. If you are on a Linux/MacOS system then you can use your terminal for generating SSH keys.

I have already written a post on "How to SSH into your remote server". In that post I have shown how to generate public/private keys using both PuTTY and terminal. Here is the link to the article - How to SSH into your remote server.


Connecting to the Remote Server using WinSCP

Follow the below steps for connecting to the remote server using WinSCP:

For FTP Protocol

  1. Open WinSCP program

  2. Provide the hostname of your website eg. example.com

  3. Provide the username of the user account on the server, generally it would be root

  4. Provide the password for the server's user account

  5. Click Login

For SFTP Protocol

  1. Open WinSCP program

  2. Provide the hostname of your website eg. example.com

  3. Provide the username of any user on the server, generally it would be root

  4. Click on the Advanced button. From the side navigation, click on Authentication under SSH

  5. Browse for your private key from your computer and then click OK

  6. Click Login

That's it! You can now access all files on your server securely. You can edit files, delete files, upload and download files etc.


From this post we learned:

  • What is FTP and SFTP?
  • Downloading and Installing WinSCP?
  • How to connect to remote server using WinSCP with FTP and SFTP protocols

I hope you have learned something out of this post.


Tags: