How to create an SFTP Server?


HD Community Advisor
Staff member
If you can log in over SSH, you can SFTP.

Just ensure that all your users and directories have minimal permissions.

I think the question is how to enable SFTP without allowing SSH. A while back, I was troubleshooting a godaddy site, and found that their support calls SFTP as FTP.
They provide SFTP without shell access.

The following entry in sshd_config converts ssh(openssh-server) into a sftp server. I suppose, this can be done in a read only authorized_keys too.

ForceCommand internal-sftp

NOTE: Careful, this applies for all users. Don't get yourself locked out. Use another instance or some other daemon.