SSH with key TrueNAS/Synology won't work properly

sanscorp

Cadet
Joined
Aug 8, 2021
Messages
3
First of all, I'm still quite the noob, concerning both TrueNAS and Linux / CLI so please bear with me on this one.
English is also not my native language.

I am running the latest TrueNAS Core on an HP Workstation Z420 (Xeon, 24GB ECC mem, Samsung EVO SSD boot and 6 SAS disks connected via an HBA in ZFS RAIDZ2).
I am also trying to make a file backup of the current data on the pool and would like to do so with Rsync.

The account rsync has been created on both TrueNAS and the Synology (DS211+).
The key has been created on the TrueNAS server and is copied over to the Synology under /volume1/homes/rsync/.ssh

On both machines there are three files in the users home directory:
- authorized_keys
- id_rsa
- id_rsa.pub
- known_hosts

The public key is also entered in the rsync account on the TrueNAS machine and both accounts have read/write permissions on the pool and folder on the synology.

Via Putty I can open an SSH connection from TrueNAS to Synology (ssh 192.168.0.103) but am prompted for a password.
The other way arround, from Synology to TrueNAS I am NOT prompted for a password and the SSH connection is made instantly.

When I try to set up a Rsync job via TrueNAS I always get error 14, permission denied.

I am struggling with this for 5 days now and have read multiple tutorials, SSH syntaxes to create keys etc.
Who can help me troubleshoot this issue?
 
Joined
Jun 2, 2019
Messages
591
I think you need to create a key pair on each system separately, then copy only the public key to the other system.

If you changed the hostname or IP address of either system, you may need to delete stale entries in the known_hosts file.
 

sanscorp

Cadet
Joined
Aug 8, 2021
Messages
3
I thought the whole purpose was to generate a unique key that is shared between systems for validation. I the keys differ from one and another, how could ssh validate them?
 

sanscorp

Cadet
Joined
Aug 8, 2021
Messages
3
After 5 days of trying, it finally worked and you were right.

I needed to run ssh-keygen on the Synology as well.

Following this guide I got it all running:
 
Top