Setup SSH key pair between Linux Server and Diskstation

SSH to Diskstation:
mkdir ~/.sshkeys && cd ~/.sshkeys
ssh-keygen -t dsa -b 1024 -f ~/.sshkeys/diskstation-rsync-key
cd /root/.sshkeys
ls -ls
chmod 600 /root/.sshkeys/diskstation-rsync-key

SSH to Server:
mkdir ~/.sshkeys && cd ~/.sshkeys
ssh-keygen -t dsa -b 1024 -f ~/.sshkeys/server-rsync-key
cd /root/.sshkeys
ls -ls
chmod 600 /root/.sshkeys/server-rsync-key

WinSCP to Server:
copy /root/.sshkeys/server-rsync-key.pub to Diskstation /root/.sshkeys

SSH to Diskstation:
touch /root/.ssh/authorized_keys
cat /root/.sshkeys/server-rsync-key.pub >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys

Test SSH Connection from Server to Disktation:
ssh -i ~/.sshkeys/server-rsync-key root@nullyournas.diskstation.me

WinSCP to Diskstation:
copy /root/.sshkeys/diskstation-rsync-key.pub to Server /root/.sshkeys

SSH to Server:
touch /root/.ssh/authorized_keys
cat /root/.sshkeys/diskstation-rsync-key.pub >> /root/.ssh/authorized_keys

Test SSH Connection from Diskstation to Server:
ssh -i ~/.sshkeys/diskstation-rsync-key root@nullyourserver.de

Source:
http://raphael.kallensee.name/journal/how-to-backup-an-external-server-with-a-synology-nas-via-rsync/

Posted in Linux, System Utils

Leave a Reply