APTadmins

Registered
Feb 27, 2014
1
0
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.