dapurhosting.com Blog for Tech

April 2, 2024

SSH Key (SSH without password)

Filed under: Uncategorized — dh @ 4:24 am

Di server sumber, beri izin untuk akses sebagai root

nano /etc/ssh/sshd_config
PermitRootLogin yes

service sshd restart

Di server lokal, test akses ke server sumber

ssh -p port_ssh_server remote_username@remote_server_ip_address

logout kembali ke server lokal

Di server lokal, jalankan perintah

ssh-keygen

ikuti arahan saat generate ssh key
untuk nama file gunakan format: id_rsa-hostnameserver

Di server lokal, jalankan perintah copy ssh id

ssh-copy-id -p port_ssh_server remote_username@remote_server_ip_address

Login ke server dengan menggunakan ssh key

ssh -p port_ssh_server remote_username@remote_server_ip_address

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress