Unable to SSH Access with key exchange

Unable to SSH Access with key exchange

Postby sormariano » Fri Dec 26, 2025 6:19 pm

Hello
I am able to access with root username and password in my Lacie Netwprk Space 2 with last firmware 18.3.
I want to use is as a backup NAS through a shell script using rsync (another problem for a my future post)-
But I'm not able to enable the SSH Access through keys:
I always have
Code: Select all
root@lacie-nas.station: Permission denied (publickey).

How can I solve this ? I used a lot of kind of generated keys but with no success.
If you need some trace or log, please ask I'll post them.
I'm trying the ssh connection both from a Linux PC and an Asustor NAS.
Thanks
sormariano
Donator VIP
Donator VIP
 
Posts: 4
Joined: Sun Jan 23, 2022 11:50 am

Re: Unable to SSH Access with key exchange

Postby sormariano » Sat Dec 27, 2025 4:53 pm

I will try to be more detailed.

I would like to use this command to do a backup managed by cron fro my Asustor
Code: Select all
rsync -aAXvz --delete --numeric-ids /volume1/home root@lacie-nas:/share/1000/backup_asustor

In this way I can keep the user and groups ids. If I'd use rsyncd user, all the files on the Lacie will have as owner and group rsyncd:rsyncd
I am in my home network ancd I could also use a file containing the rsyncd password, if I'm not wrong, but I prefer to use keys.
But I don't understand where is my error
sormariano
Donator VIP
Donator VIP
 
Posts: 4
Joined: Sun Jan 23, 2022 11:50 am

Re: Unable to SSH Access with key exchange

Postby Jocko » Mon Dec 29, 2025 9:40 am

sormariano wrote:Hello
I am able to access with root username and password in my Lacie Netwprk Space 2 with last firmware 18.3.
I want to use is as a backup NAS through a shell script using rsync (another problem for a my future post)-
But I'm not able to enable the SSH Access through keys:
I always have
Code: Select all
root@lacie-nas.station: Permission denied (publickey).

How can I solve this ? I used a lot of kind of generated keys but with no success.
If you need some trace or log, please ask I'll post them.
I'm trying the ssh connection both from a Linux PC and an Asustor NAS.
Thanks

Hi

You have to enable the option "SSH Access with key exchange" from SSH server

Please to notice with this mode, you can no longer use root credentials to login as by using key exchange we assume you want to open the ssh port and it is not safe to have an access from WAN with password
Jocko
Site Admin - expert
 
Posts: 11576
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Unable to SSH Access with key exchange

Postby sormariano » Fri Jan 02, 2026 4:46 pm

Ok I solved but I have some questions.

I logged to the asustor with key but from client I had to do this:
Code: Select all
ssh -o PubkeyAcceptedAlgorithms=+ssh-rsa -i .ssh/id_rsa_lacie root@lacie-nas


Said this, anyway I succeeded in making a backup with rsync servar to copy file FROM my Asustor NAS (configured with rsync server with modules) TO my Lacie.
But till now I only was able to do these backups manually from GUI.
Maybe it's my fault but the GUI isn't too much user-friendly-
I'm still trying to automate (with cron) these backups with the help of a wakeonline through the administrator GUI but it's not easy
sormariano
Donator VIP
Donator VIP
 
Posts: 4
Joined: Sun Jan 23, 2022 11:50 am

Re: Unable to SSH Access with key exchange

Postby sormariano » Sun Jan 04, 2026 4:53 pm

Ok finally I succeed in setting backups using the GUI, but I suppose there is an error. Could you check ?
I have the Selected source folder as an RSYNC module of another NAS and as "Selected destination folder" a folder in my Lacie.
Then I "Add scheduled backup in cron" and, at its execution I get the error:
Code: Select all
PHP Parse error: syntax error, unexpected '.' in /share/1000/cronjobs/Rsync_Public.on.backup_asustor_tpWsjD.php on line 21

due to the dot '.' of
Code: Select all
--password-file="/rw_fs/etc/.passwd-192.168.1.2:myuser"


The backup works fine if I replace the double quotes of the password filename with single quotes or if I remove them at all.

The whole line 21 is:
Code: Select all
$cmd = "umask 0 && /usr/sbin/rsync --stats --force --ignore-errors --modify-window=2 -tDvplogr --delete -8 --password-file="/rw_fs/etc/.passwd-192.168.1.2:myuser" --port=873 myuser@192.168.1.2::'Public' '/share/1000/backup_asustor/Public'> '/share/1000/cronjobs/Public_";


Please, note the double quotes after --password-file that I suppose are the ones sending the interpreter in panic since they cause an undesired closure of the double quote at the beginning

P.S. I think it's also missing a single quote at the last end of the $cmd build. I added it
sormariano
Donator VIP
Donator VIP
 
Posts: 4
Joined: Sun Jan 23, 2022 11:50 am

Re: Unable to SSH Access with key exchange

Postby Jocko » Mon Jan 05, 2026 4:04 pm

Hi

Thank you for the feedback. I go to check this issue this week.
Jocko
Site Admin - expert
 
Posts: 11576
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 1 guest