|
|
Zeile 1: |
Zeile 1: |
| == ssh ohne Passwort ==
| |
| '''
| |
|
| |
|
| ----
| |
|
| |
|
| |
| In meinem Fall 2 Synology boxen: box1->DS106j box2->DS209+II.
| |
|
| |
| Es sollte aber auch zwischen Synology box und einer beliebigen Linux Distribution oder freeBSD ebenfalls funktionieren,
| |
| habe aber nicht getestet.
| |
|
| |
|
| |
| 1.) Beide Synology boxen via telnet oder ssh einloggen.
| |
|
| |
|
| |
| 2.) Key generieren:
| |
|
| |
| '''ssh-keygen -t rsa'''
| |
|
| |
|
| |
| 3.) /etc/ssh/sshd_config anpassen:
| |
|
| |
| '''vi /etc/ssh/sshd_config'''
| |
|
| |
|
| |
| RSAAuthentication yes
| |
|
| |
| PubkeyAuthentication yes
| |
|
| |
| AuthorizedKeysFile ~/.ssh/authorized_keys
| |
|
| |
|
| |
| 4.) Auf der box1 Inhalt von /root/.ssh/id_rsa.pub kopieren:
| |
|
| |
| '''cat /root/.ssh/id_rsa.pub'''
| |
|
| |
|
| |
| und in /root/.ssh/authorized_keys von box2 einfügen:
| |
|
| |
| '''vi /root/.ssh/authorized_keys'''
| |
|
| |
|
| |
| Ich habe bei mir, ebenfalls umgekehrt gemacht, Inhalt von id_rsa.pub (box2) in /root/.ssh/authorized_keys von box1 hineinkopiert,
| |
|
| |
| weil ich von beiden boxen passwordless SSH brauche.
| |
|
| |
|
| |
| 5.) SSH daemon via telnet oder die box einfach restarten:
| |
|
| |
| '''/usr/syno/etc/rc.d/S95sshd.sh restart'''
| |
|
| |
|
| |
| 6.) Testen mit:
| |
|
| |
| '''ssh IP_adresse'''
| |
|
| |
|
| |
| Wenn OK, kommt keine Passwordeingabe.
| |
|
| |
|
| |
| Viel Erfolg!
| |
|
| |
| cccc
| |