Linux sftpd

From Ever changing code
Revision as of 14:09, 29 November 2018 by Pio2pio (talk | contribs) (Created page with "This is just draft.... <source> sftp user1@server.com -oIdentityFile=/path/to/private/keyfile </source> Snipped below shows usage of custom auth keys, allow for public, then...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is just draft....

sftp user1@server.com -oIdentityFile=/path/to/private/keyfile


Snipped below shows usage of custom auth keys, allow for public, then password authentication

Subsystem sftp internal-sftp  #can take something like -l INFO and more for logging
Match User user1
    ChrootDirectory /sftp/user1
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp -u 2
    PasswordAuthentication yes
Match User user2
    ChrootDirectory /sftp/user2
    AuthorizedKeysFile /sftp/user2/.ssh_user2/authorized_keys   #both authorised keys and .ssh_user2 need to be owned by user2
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp -u 2
    PasswordAuthentication yes