ArenaStreaming

SSH atau Secure Shell merupakan protokol jaringan untuk melakukan pertukaran data melalui saluran yang lebih aman dari telnet. Salah satu penggunaannya untuk melakukan remote komputer jarak jauh.

Karena itu pemakaian password untuk remote SSH harus menggunakan kata yang susah. Agar tidak perlu mengingat password SSH, maka perlu generate SSH-Keygen.

localhost adalah hostname komputer personal, sedangkan remotehost adalah hostname komputer server yang akan diremote melalui komputer local.

1. Membuat Public dan Private Keys di localhost

user@localhost:~# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/user/.ssh/id_rsa): // Tekan Enter
Enter passphrase (empty for no passphrase): // Tekan Enter
Enter same passphrase again:  // Tekan Enter
Your identification has been saved in /user/.ssh/id_rsa.
Your public key has been saved in /user/.ssh/id_rsa.pub.
The key fingerprint is:
e9:14:59:d2:db:9b:38:bd:2d:b4:50:a1:bc:98:ee:55 user@localhost

2. Copy Public Key ke remotehost menggunakan ssh-copy-id

user@localhost:~# ssh-copy-id -i ~/.ssh/id_rsa.pub root@remotehost
root@remotehost's password: // Masukkan password root dari remotehost
Now try logging into the machine, with "ssh root@remotehost", and check in:
 
.ssh/authorized_keys
 
to make sure we haven't added extra keys that you weren't expecting. 

3. Login ke remote tanpa password

Sekarang sudah dapat login ke remotehot tanpa memasukkan password

user@localhost:~# ssh root@remotehost

Walaupun password root di remotehost diganti, masih dapat login tanpa meminta password dari remotehost.

Share this Post
Mohammad Johan Rajabi

Saat ini bekerja di salah satu perusahaan Media Broadcasting nasional, di sela-sela kesibukan sebagai Chief Of IT, sering mengisi waktu dengan menulis seputar dunia IT dan Broadcast di beberapa website rajabi.me, alloperator.com dan arenastreaming.com

Leave a Reply

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

WP Radio
WP Radio
OFFLINE LIVE
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?