Table of Contents
What is the SFTP Server
SFTP (Secure FTP Server) is a protocol that provides security and performance in file transfer operations. SFTP is a secure FTP server that helps to securely transfer files either by using SSH file transfer protocol or by using SSL/TLS over FTP. SFTP provides secure connections for file transfers between servers or from servers to users. With these secure FTP servers, file transfers can be performed securely even in insecure networks.
Advantages of SFTP
- SFTP provides encryption and authentication of data during file transfer thanks to the SSH protocol. This reduces the risk of unauthorized access or modification of data.
- SFTP uses fewer ports and generates less network traffic than FTP. This improves performance and security. SFTP Port is a protocol used for secure file transfer. The preferred port during SFTP connections is port 22. This port allows SFTP to work over the SSH protocol.
- SFTP offers more features than FTP. For example, with SFTP, metadata such as file permissions, timestamps, and symbolic links can be transferred. In addition, SFTP can be used to list, create, and delete folders.
- It supports various platforms and operating systems, such as Windows, Linux, Mac OS X, etc.
Disadvantages of SFTP
- SFTP consumes more processor and memory resources than FTP. This can degrade performance in some cases.
- SFTP is a more complex protocol than FTP. This can make it difficult to set up and manage.
- SFTP provides less compatibility than FTP. Some older systems or devices may not support SFTP.
- It may not support some advanced features or functions that are available in other protocols, such as FTPS (FTP over SSL/TLS) or SCP (Secure Copy).
In conclusion, SFTP is a protocol that combines security and performance in file transfer operations. Considering the advantages and disadvantages of SFTP, it can be preferred according to the needs. For example, SFTP can be used for transferring sensitive or confidential data over the internet or between different networks. However, SFTP may not be suitable for transferring large amounts of data or for interacting with some older systems or applications that do not support SFTP.
SFTP Server Installation
Installations were made on Windows Server 2019. First of all, it is necessary to install the OpenSSH server feature. Click on the start icon and write to apps and features.
We continue the process by going to Apps & features from the search bar.
We will install OpenSSH server by entering the Manage optional features tab. Select add a feature and install OpenSSH Server.
After the install process, we set the OpenSSH SSH service and OpenSSH Authentication Agent service to Automatic. Then we start the services.
After these operations, we create a folder for the SFTP root folder. And we copy this folder paht.
Open Notepad as run as administrator and open File > Open > C:\ProgramData\ssh\ssh\sshd_config.
We find the ChrootDirectory line in the file. We paste the path we copied into the ChrootDirectory line.
After this process, we restart the OpenSSH SSH service and OpenSSH Authentication Agent service.
We can continue the process by installing applications such as FileZilla, WinSCP, etc. I continued with the FileZilla application.
After completing the File > Site Manager > New Site process in the application. Then we enter the Protocol, Host, Port, User and Password information under the General tab. After that click the Connect button.
After the process, when we check our connection information, our connection is successful when Directory listing of successful is seen. After that we can create folders in the Remote Site section and transfer files.
After the operations, SFTP Server is ready to use.