Can't disable SSH AND enable SFTP

Hi,

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!

Status: 
Active

Comments

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:

https://www.virtualmin.com/node/28386

you could also change it using the GUI...

https://www.google.com/search?q=how+change+shell+using+virtualmin&ie=utf-8&oe=utf-8

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.

Hi,

Thank you very much.

I have managed to change the default shells now.

Have a nice day!