scp, ssh dan rsync tanpa prompting password

Dari host asal:

$ ssh-keygen -t rsa

akan menghasilkan file di ~/.ssh/id_rsa.pub

Kirim file tersebut ke host tujuan.

Lalu masuk ke host tujuan dan memasukkan isi dari id_rsa.pub yg tadi ke ~/.ssh/authorized_keys di host tujuan

$ cat id_rsa.pub >>~/.ssh/authorized_keys

$ chmod 700 ~/.ssh/authorized_keys

Jika butuh root login, edit /etc/ssh/sshd_config dan ubah PermitRootLogin dari no menjadi yes, lalu restart sshd.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.