How To: Give users SFTP access while not having shell access

Well, although most tend to believe you can’t, there is actually away, it’s not officially supported in cPanel yet, but it does work.

First, create the user like normal, and give them Shell access. Now, using the command usermod you will change the user’s shell :

#usermod -s /usr/libexec/openssh/sftp-server username

Of course, changing the last “username” field to whatever the username is.

This path is correct on Redhat 7.3, but you might want to do:

#locate sftp-server

This will tell you the definite location of this application.

Now, your users will be able to use SFTP without a problem, they will also be able to SSH in, but as soon as they issue a command, it will boot them out (as it’s just the SFTP server)

Note: Although this is used by some, it’s not an official method, and cPanelFAQ.org does not know if any security risks are involved in this procedure.

For more details visit bodHOST and initiate a live chat to get the latest cPanel hosting plans.

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

VZPP: Virtuozzo Power Panel

What is Virtuozzo Power Panel? Virtuozzo Power Panels (VZPP) is a powerful web-based recovery and…

What is 204 Status Code? A Beginner-Friendly Guide

What is 204 Status Code? A Beginner-Friendly Guide

HTTP status codes help you understand how a server responds to a request made by…

Intel Xeon E3-1230V2 3.3 GHz Server Specifications and Features

Intel Xeon processor E3-1230V2 3.3 GHz server platform for Intel Ivy Bridge offers a professional…