ProFTPD issue with sftp [SOLVED]

knothje

Verified User
Joined
Nov 22, 2006
Messages
29
Hi Guys!

I want to use sftp on one of our servers, normally i use this tutorial: https://help.directadmin.com/item.php?id=439 and it works fine but this time not even close.
I have removed all the ftpd installations, then i installed ProFTPD to be sure that worked fine. And it works fine.

But when i do this:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build set ftpd proftpd
mkdir -p custom/proftpd/conf
wget -O custom/proftpd/configure.proftpd http://files.directadmin.com/services/all/sftp/configure.proftpd.sftp
wget -O custom/proftpd/conf/proftpd.conf http://files.directadmin.com/services/all/sftp/proftpd.conf
chmod 755 custom/proftpd/configure.proftpd
wget -O /etc/proftpd.sftp.conf http://files.directadmin.com/services/all/sftp/proftpd.sftp.conf
./build proftpd
We end up this:

Done proftpd.
Restarting ProFTPd.
Job for proftpd.service failed because the control process exited with error cod e.
See "systemctl status proftpd.service" and "journalctl -xe" for details.

systemctl status proftpd gives:

fatal: AuthOrder: AuthOrder has already been configured on line 7 of '/etc/proftpd.sftp.conf'
proftpd[17380]: warning: unable to include '/etc/proftpd.sftp.conf': Operation not permitted
proftpd[17380]: fatal: SFTPHostKey: unable to use '/etc/ssh/ssh_host_rsa_key' as host key, as it is group- or world-accessible on line 90 of '/etc/proftpd.conf'

So what goes wrong?

Kind Regards,

Alexander
 

k1l0b1t

Verified User
Joined
May 10, 2020
Messages
70
Location
Belgium
Problem was that the /etc/ssh/ssh_host_rsa_key was group accessible

chmod that file to 700 to fix the issue
 

knothje

Verified User
Joined
Nov 22, 2006
Messages
29
Solved it:

Code:
chmod 600 /etc/ssh/ssh_host_rsa_key
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
 
Top