How to disable SFTP for a user, but keep FTP enabled

5,860

First point , FTP and SFTP both are different. FTP normal file transfer protocol but SFTP is secure file transfer protocol and this service is from SSH not a stand alone service.

If you want to disable SFTP for one user then open sshd_config file in server(machine you are trying to access) and

DenyUsers ftp-acc

and then restart sshd service with

service sshd restart

Share:
5,860

Related videos on Youtube

A.J. Ruckman
Author by

A.J. Ruckman

Updated on September 18, 2022

Comments

  • A.J. Ruckman
    A.J. Ruckman over 1 year

    I've created a user called "ftp-acc" and limited it to a single directory using VSFTPD. When I login to the account in Filezilla using FTP, it is successfully restricted to a single directory.

    However, when logging in with the same credentials using SFTP, the user can access other directories as well.

    How can I disable SFTP for the user "ftp-acc"?