Grant SFTP access but not SSH access

Posted on 2009-04-28
Last Modified: 2012-05-06
I run a webserver on CentOS 5.  I created a new user called: "foo"

I want to give foo SFTP access but not command line access.
Question by:hankknight
    LVL 7

    Accepted Solution

    LVL 29

    Assisted Solution

    to deny user to login to server by using ssh



    DenyUsers root finadmin
    DenyGroups root finadmin

    after that restart that sshd

    LVL 14

    Assisted Solution

    check this article and check the commnets posted with it, it will work with CentOS too

    also you can setup rssh

    Good Luck
    LVL 7

    Assisted Solution

    The other solutions will still let someone read the rest of your filesystem. They will start off in there /home/foo but will still be able to cd all the way up to /

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now