Why Use SFTP for File Transfers
When it comes to FTP vs. SFTP, there are some key differences to keep in mind. First, no one wants their information to fall into the wrong hands. Second, FTP (File Transfer Protocol) uses clear text for all transmissions.
Anyone can read the FTP usernames, passwords, commands, and data by sniffing the network.
On the other hand, SFTP can securely transfer information. This is because it builds on FTP software and uses the SSH protocol to transfer files, and requires the client to be authenticated by the server for enhanced security elements.
In short, SFTP is designed to be an extension of SSH to provide secure file transfer capabilities.
Related: SFTP Command, How to Use it Practically for Secure File Transfer
Connect to SFTP Using FileZilla
FileZilla is a free open source FTP software tool allowing users to transfer files from a local computer to a remote computer. It is capable of running on Windows, Linux, and macOS. FileZilla supports FTP, SFTP, and FTPS protocols.
SFTP provides two user-authentication options when connecting to your server:
- Passwords
- SSH key-based authentication
The SSH Keys are more secure than the password. In this article, we’ll cover both ways.
Please keep in mind that if the server youโre connecting to only supports FTP connections, not SSH connections, you wonโt be able to use SFTP.
SFTP with FileZilla Using Password
Open the FileZilla Site Manager
by clicking the top left icon in the menu bar.
A popup will appear for you to create a new profile. Click on the New Site
button and give the new site connection name.
At the right-side panel, enter the following information:
- Protocol: This is a drop-down section. Select the
SFTP - SSH File Transfer Protocol
option. - Host: Enter your server name or server IP address.
- Port: 22
- Logon Type: Select
Normal
from the drop-down menu. - User: System userโs username.
- Password: System userโs password.
Press the Connect
button, and it will save these settings and connect FileZilla to the SFTP server.
Accept the SSL Certificate by clicking the OK
button. Make sure you have Always trust this host, add this key to the cache
checked so you will only have to accept the certificate once.
Once you have completed the above, you should be able to connect FileZilla to your SFTP server.
Once youโre connected, youโll see a list of files on the server on the right side. To upload new files, drag files from your computer (Local site
) to the server (Remote site
).
SFTP with FileZilla Using SSH Key-based Authentication
If you have not yet created an SSH key pair, you can check this tutorial: Generate an SSH Key Pair: How to Do it (with Examples).
Open the FileZilla Site Manager
by clicking the top left icon in the menu bar.
A popup will appear for you to create a new profile. Click on the New Site
button and give the new site connection name.
At the right-side panel, enter the following information:
- Protocol: This is a drop-down section. Select the
SFTP โ SSH File Transfer Protocol
option. - Host: Enter your server name or server IP address.
- Port: 22
- Logon Type: Select
Key file
from the drop-down menu. - User: System userโs username.
- Key file: Click on the
Browse
button and select your private key file.
Press the Connect
button, and it will save these settings and connect FileZilla to the SFTP server.
Accept the SSL Certificate by clicking the OK
button. Make sure you have Always trust this host, add this key to the cache
checked so you will only have to accept the certificate once.
Conclusion
Congratulations, you have successfully connected FileZilla to your SFTP server!
Now you know that SFTP means SSH File Transfer Protocol, and it provides a secured connection while transferring files from one host to another. Its functionalities are similar to FTP but differ only in the protocol.
Related: Securely Transfer Files and Folders Between Computers Using Croc
If you have any questions or tips to share, youโre welcome to do so in the comment section.