Rsync SSH with Scale

Patrick_3000

Contributor
Joined
Apr 28, 2021
Messages
167
Can someone please help with a newbie question regarding SSH setup?

I've recently learned that rsync module support is being eliminated from Scale with the Cohiba release. Unfortunately, I currently have eight different rsync module tasks that transfer data between my Truenas Scale server and two different clients, both running Linux Mint. Most are push tasks, but one is pull.

Rather than use a third party app for rsync, I'm considering switching to SSH mode for the tasks.

I'm not well-versed in SSH, but my main question is this: when setting up SSH, should I generate the key pair in Scale, and then manually transfer it (like on a flash drive or over a Samba share) to the client machines running Mint? I think that's the easiest approach, but the other option would, I guess, be to generate the key pairs on the Mint machines and transfer them to Scale.

Any thoughts on this or any other suggestions to get me started in the right direction would he extremely helpful!
 
Last edited:

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
You can generate the key pair on any machine and it should work either way.
 

Patrick_3000

Contributor
Joined
Apr 28, 2021
Messages
167
As a follow-up, I have succeeded in converting all rsync tasks from module to SSH mode, so I'm ready for Cohiba.

The conversion wasn't particularly difficult, for anyone faced with the same issue. All you need to do is: (1) make sure that SSH-server (not merely client) is installed on the remote (non-Truenas) host; (2) on Scale, under “Credentials,” “Backup Credentials,” “SSH Keypairs,” generate an SSH keypair and download the public key; (3) On the remote system, in the user home folder under the ".SSH" folder which was hidden in my distro (Mint), place the public key file and rename it "authorized_keys"; (4) On Scale, under “Credentials,” “Backup Credentials,” “SSH Connection,” create a new connection to the remote host and specify the keypair that was previously created; (5) create the rsync task, specifying “SSH” mode, and for “connect using,” choose “SSH connection from the keychain” and specify the connection to the remote host that was set up in the previous step.

One tip: in the final step, when initially creating the rsync task, you may wish to uncheck "Validate Remote Path" and save. That way, if there is any problem with how you set things up, you'll still have the task saved. If you leave it checked, it will refuse to save if there are any problems with your SSH setup. Once it's saved, you can troubleshoot. Eventually, however, you will need to check this box and save.
 
Top