0

I need to create a user that can use ssh, but not download files through sftp. I've googled a lot, and had try a lot of configurations, but none of them work. So I think the only way to do it, it's not disabling sftp for that user, but blacklisting the download of files from the server for him. is there a way to do it? I need that the user can go though files and see her size, and some other properties, but not download them. My system is an Ubuntu 16.04. I've already tried to edit the /etc/ssh/sshd_config file and edit/including the lines:

Subsystem sftp internal-sftp  
Match User notdownloaderuser
   ForceCommand internal-sftp -p read

and including after restart the services (ssh and sshd) it won't work, ssh terminal exited with code 1 (without the above lines it works fine)

Any ideas?

tnt80
  • 1
  • I think this referrers or the same like this question: https://serverfault.com/questions/290843/how-to-disable-sftp-for-some-users-but-keep-ssh-enabled – Orbán Zoltán Sep 22 '21 at 14:17
  • 1
    @OrbánZoltán I've tried that, but the solutions proposed don't worked in my case, I don't need to limit the ssh to a single application, I need them to can see the disk free space, the size of the files, to know the state of the server, so I the list of commands to allow will be huge, and the solutions proposed there only works to limit ssh to a single application. But thanks for the link, – tnt80 Sep 23 '21 at 08:25

0 Answers0