🗃️How To Install & Configure SFTP

Introduction
SFTP stands for SSH File Transfer Protocol. Its main function is to make data transfer activities between clients and servers safer. In another sense, this method can prevent hacking or piracy by hackers. However, if you look at its abbreviation, is SFTP the same as FTP? Similar but not the same, maybe that is the most appropriate answer. There are quite significant differences between FTP and SFTP, especially in terms of security.
Difference Between FTP & SFTP
FTP is a network protocol used to exchange files over a TCP/IP network. Meanwhile, SFTP is a network protocol that allows file access, transfer, and management over data streams.
FTP does not provide any security channel for transferring files between hosts. However, the SFTP protocol does.
FTP can be accessed anonymously, and in most cases is not encrypted. In contrast, SFTP is a protocol that always encrypts data.
On the one hand, FTP establishes a connection using a control connection on TCP port 21. On the other hand, SFTP is a protocol that transfers files under a secure connection belonging to the SSH protocol between the client and the server.
Configuration
Debian11- Server
Install Package
nano /etc/proftpd/proftpd.conf
#DefautRoot
Changed into
DefautRoot
Restart proftpd
Service
proftpd
Servicesystemctl restart proftpd
Create a Group & Users
groupadd sftp-rizwan
Create an Directory
mkdir -p /srv/sftp-office
Changing User Password
passwd itsupport
passwd sysadmin
passwd developer
SSH configuration
(Add SSH configuration at the bottom)
nano /etc/ssh/sshd_config
Match Group sftp-rizwan
PasswordAuthentication yes
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
ChrootDirectory /srv/sftp-office
ForceCommand internal-sftp
Configuration is Completed
Check SFTP in Windows- Client
Open Filezilla on Windows- Client and the user can use itsuppor
t, or sysadmin
, or developer
with the password that you have changed
20.1.1.20 itsuppport/sysadmin/developer (password) port:22
Last updated