0. generate keys on client

[cc lang=”bash” escaped=”true” width=”600″]

ssh-keygen -t rsa -C “backup user on client that wants to rsync to qnap far away”;

[/cc]

when asked for passphrase, do not enter anything…

1. one needs to upload one’s public key (id_rsa.pub)

2. one need to attach your public key to this file:

[cc lang=”bash” escaped=”true” width=”600″]

cd .ssh;

mv id_rsa.pub id_rsa_to_upload_to_qnap.pub;

scp -P12345 id_rsa_to_upload_to_qnap.pub admin@XXX.XXX.XXX.XXX:/mnt/HDA_ROOT/.config/ssh/; # use port 12345 and user admin to upload public key to qnap2

ssh -p12345 admin@XXX.XXX.XXX.XXX; # now login to your qnap

cd /mnt/HDA_ROOT/.config/ssh/;

cat id_rsa_to_upload_to_qnap.pub >> /mnt/HDA_ROOT/.config/ssh/authorized_keys;

rm -rf id_rsa_to_upload_to_qnap.pub;

exit;

[/cc]

if you logout and re-dial-in with ssh, you should get granted immediate access, without beeing asked for a password:

[cc lang=”bash” escaped=”true” width=”600″]

ssh -p12345 admin@XXX.XXX.XXX.XXX; # now login to your qnap

[/cc]

Voila!

Related Links:

https://wiki.qnap.com/wiki/SSH:_How_To_Set_Up_Authorized_Keys

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin