Results 1 to 2 of 2

Thread: Could do with some help with a debian server (sftp)

  1. #1
    Join Date
    Jul 2012

    Could do with some help with a debian server (sftp)


    Ive been trying to get a "user" setup for a friend, basically so he could enter IP address of server and it would come up with the directory structure of a certain directory but my attempts so far have failed.....

    This server is bought and I have a user that was setup via a template lets call it "me" I can log in via internet explorer via (fake ip for security) and it will ask for my login and pass and off it goes no problem, but when I try the user I set up it just bounces back to the login prompt, but it can log in via filezilla for example.

    I must admit now that my use of this is very limited so walk through would be very appreciated

    What ive one so far

    Edited sshd_config with :-

    subsystem sftp internal-sftp (#ing the original line)
    adding at the bottom :-
    Match group sftponly
    ChrootDirectory /home/%u
    ForceCommand internal-sftp
    X11Forwarding no
    AllowTcpForwarding no
    Restarted the ssh server

    Added the group sftponly

    added user with

    useradd -m username
    Added user to sftp group with

    usermod -g sftponly username
    removed the shell access

    usermod -s /bin/false username
    Changed ownership

    chown root:root /home/username
    Created a fake home dir

    mkdir -p /home/username/home/username
    Switched user ownership

    chown username:username /home/username/home/username
    and then mouted a directory inside the usernames home direcory

    mount -o bind /some/directory/ /home/username/home/username/new directory
    Is there anything else I need to do to make this work or will it not work at all?


  2. #2
    Join Date
    Aug 2008
    What does this have to do with directadmin?

Similar Threads

  1. install debian and DA on a new server. Please
    By groomy in forum Installation / System Requirements
    Replies: 8
    Last Post: 05-21-2012, 01:44 AM
  2. Port 22 = SFTP?
    By ORiN in forum DirectAdmin General Discussion
    Replies: 2
    Last Post: 06-12-2011, 07:57 PM
  3. How can I add a SFTP account?
    By Wijs in forum DirectAdmin General Discussion
    Replies: 16
    Last Post: 08-30-2005, 12:44 PM
  4. Can't login with FTP only SFTP
    By wombat in forum General Technical Discussion & Troubleshooting
    Replies: 5
    Last Post: 11-22-2004, 07:11 PM
  5. Backup SFTP
    By thoroughfare in forum Admin-Level Difficulties
    Replies: 7
    Last Post: 03-13-2004, 12:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts