To disable FTP while keeping SFTP enabled with the given configuration, you can make the following changes:
- Open the vsftpd.conf file using a text editor: sudo nano /etc/vsftpd/vsftpd.conf
- Add the following line at the end of the file to configure vsftpd to listen on the SFTP port (port 22) instead: listen_port=22
- Save the changes and exit the text editor.
- Restart the vsftpd service to apply the new configuration: sudo systemctl restart vsftpd
With these changes, vsftpd will no longer listen on the FTP port (21), effectively disabling FTP. However, it will still be listening on the SFTP port (22), allowing SFTP connections to continue functioning.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article