The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SFTP via proftpd

Discussion in 'General Discussion' started by samend, Jan 19, 2015.

  1. samend

    samend Member

    Joined:
    Dec 15, 2014
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello Community is there an way to use SFTP via the proftpd Server under Cloudlinux?
     
  2. APTadmins

    APTadmins Registered

    Joined:
    Feb 27, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    You can use the following step. I have configured sftp usinf below step..

    Create a file like below.
    vi /etc/proftpd/conf.d/sftp.conf

    and add the following content to the file.


    <IfModule mod_sftp.c>

    SFTPEngine on
    Port 2222
    SFTPLog /var/log/proftpd/sftp.log

    # Configure both the RSA and DSA host keys, using the same host key
    # files that OpenSSH uses.
    SFTPHostKey /etc/ssh/ssh_host_rsa_key
    SFTPHostKey /etc/ssh/ssh_host_dsa_key

    SFTPAuthMethods publickey

    SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u

    # Enable compression
    SFTPCompression delayed

    </IfModule>

    SSH Key authentication.

    Proftp is able to use ssh key to authenticate users. But the keys should be in RFC4716 format.

    Make a directory to store key
    mkdir /etc/proftpd/authorized_keys
    Convert the public keys that are currently used to log into the server
    sudo ssh-keygen -e -f ~username/.ssh/authorized_keys | sudo tee /etc/proftpd/authorized_keys/username

    Restart proftpd

    service proftpd restart

    Hope this will help you.

    Thanks
     
  3. samend

    samend Member

    Joined:
    Dec 15, 2014
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for your reply i have done this yesterday but it was not succesfull!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    SFTP should work by default without modifying your FTP configuration. SFTP is essentially FTP over SSH, so it's a completely different protocol than standard FTP. One point to remember is that when you create virtual FTP accounts via cPanel, users can not access SFTP with those authentication details. Only the cPanel account username/password is able to authenticate with SFTP.

    Thank you.
     
Loading...

Share This Page