Difference between revisions of "Linux sftpd"

From Ever changing code
Jump to navigation Jump to search
(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...")
 
 
Line 5: Line 5:




Snipped below shows usage of custom auth keys, allow for public, then password authentication
Snipped below shows usage of custom auth keys, allow for public, then password authentication. The <tt>user1</tt> authorisation key file will be in the <code>USER_HOME/.ssh/authorised_keys</code> the other user <tt>user2</tt> will use custom path to the authorised keys file.
<source>
<source>
Subsystem sftp internal-sftp  #can take something like -l INFO and more for logging
Subsystem sftp internal-sftp  #can take something like -l INFO and more for logging

Latest revision as of 15:32, 29 November 2018

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. The user1 authorisation key file will be in the USER_HOME/.ssh/authorised_keys the other user user2 will use custom path to the authorised keys file.

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