Ssh – Changing copssh default FTP root breaks RSA authentication

copsshftpsftpssh

I have a question about copssh configuration. I want to change the home directory when a user logs in via SFTP but when I change the directory in the /etc/passwd file, I am no longer able to login with my RSA key. I have blocked password authentication and when I leave the root path /home/username I am able to access SFTP and SSH just fine with my private key.

I hope I have included everything. Thanks in advance for the help!

Best Answer

Have you copied the directory /home/username/.ssh to the new home directory? It's easy to miss as it's a hidden folder.