Can't disable SSH AND enable SFTP


I need to allow my users to use SFTP, but i also want to disable SSH access to them.

It seems SFTP only works for them if i allow SSH access to them.

Thanks for any help!



Howdy -- if you change the user's shell to /bin/false, I believe that would do what you're after.

The user wouldn't have a working shell, but they should still be able to access SFTP.

Could you tell me where/how to change the user's shell?

Also, is there any way to automatically "change the user's shell to /bin/false" when a new virtual server/ user is created?

Thank you very much :)

from the command line, you can change the user's shell this way:

you could also change it using the GUI...

What jimdunn said is correct.

In the GUI, you can change the shell by going into Webmin -> System -> Users and Groups, and then select the username.

Also, to change the shell for users in the future, what you can do is go into System Customization -> Custom Shells. That screen allows you to choose what shell your users will receive.


Thank you very much.

I have managed to change the default shells now.

Have a nice day!