Problem with SSH key login when FTP user added to site #266

Closed
opened 2026-04-05 20:26:18 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Kuba1842 on 2/10/2024

CloudPanel version(s) affected

v2.4.1

Description

Problem with SSH login via keys when FTP account is created

How to reproduce

Today I ran into the problem that I could not log in under SSH user of an added site through SSH keys.

  • The keys were added via cloudpanel (but even when I added them directly via sftp to authorized_keys no change)
  • chown was set correctly on the user
  • chmod of the .ssh folder was at 0700
  • chmod .ssh/authorized_keys was at 0600
    in short, everything that should be so looked fine.
    But the /var/log/auth.log still showed "sshd[1036517]: Authentication refused: bad ownership or modes for directory"

I didn't know what to try anymore, so I tried deleting the FTP account created for this site and then the login worked. Probably somehow the permissions of the created FTP account are confused with the SSH account??? I guess, I don't know honestly. :-D

Possible Solution

No response

Additional Context

No response

*Originally created by @Kuba1842 on 2/10/2024* ### CloudPanel version(s) affected v2.4.1 ### Description Problem with SSH login via keys when FTP account is created ### How to reproduce Today I ran into the problem that I could not log in under SSH user of an added site through SSH keys. - The keys were added via cloudpanel (but even when I added them directly via sftp to authorized_keys no change) - chown was set correctly on the user - chmod of the .ssh folder was at 0700 - chmod .ssh/authorized_keys was at 0600 in short, everything that should be so looked fine. But the /var/log/auth.log still showed "sshd[1036517]: Authentication refused: bad ownership or modes for directory" I didn't know what to try anymore, so I tried deleting the FTP account created for this site and then the login worked. Probably somehow the permissions of the created FTP account are confused with the SSH account??? I guess, I don't know honestly. :-D ### Possible Solution _No response_ ### Additional Context _No response_
Sign in to join this conversation.