Rsync over SSH need a user with a private key

Hello everyone,

I would like to set up a rsync via SSH.

The connection is established and I have created an SSH key pair for a user.
However, when configuring a task, I cannot save it because of the following error message:

In order to use rsync over SSH you need a user with a private key (DSA/ECDSA/RSA) set up in home dir.

I was able to find this topic here in the forum:

However, it’s quite old and I’m not sure if this is still necessary or if I’m missing something?

Has anyone seen this issue as well?

for this issue, select the user in truenas credentials > user.

then create the user’s home directory. If you had one already setup previously, you can simply select that and apply. If not, select where to place the home directory then it should create one named after the user. I’m not certain where might be a good location u have to figure that one out.

once you finished creating and setting up the home directory for that user, then you probably can proceed to generate the keys (which will then be stored in that users home directory, hence the warning)

Basically that is what that error message meant, when i was troubleshooting my own issue and found out

Hi mooglestiltzkin,

Thanks for your reply.

The user already has a home directory. It is also named like the user.
The key pair has also been created and I have also stored the public key in the user settings.

I also use the directory, so I can confirm that this is available.
However, the same error message still appears.

How can I show you this?
Or is there a way to check this?

According to this, the key should be in the directory, right?

1 Like

What are the permissions for the user’s .ssh directory?

ls -lRa $HOME/.ssh
2 Likes

ya i sus the same. if it’s there but can’t access, i’m more inclined to believe permission issue. so check that out.

Thank you @mooglestiltzkin and @winnielinnie.

The permissions. I could have guessed that.

I have two Key’s found.
They run on root / wheel

However, I am probably confused now.
No date matches the date on which I created SSH keys.

I have to ask again; do I have to create a .ssh folder in the home directory?

I also looked at the documentation again and so far you can’t do much wrong with the creation.

1 Like

For the non-root user in question, you can generate a private-public keypair with ssh-keygen and then send the public key over to the source server with ssh-copy-id. Or you can manually copy the public key over.

It depends on the direction of the Rsync transfer, you might have to do it the other way around (e.g, the source generates the keypair, and the destination gets the public key.)

Hi everyone,

The issue lies with the target system.

It is a Synology DS120j and advanced settings have to be made there.
If anyone has already gone through this and has a workaround, I would be pleased.

However, this issue has been resolved so far.

Thanks again.

1 Like