Assalamualaikum Warrahmatullahi Wabarakatuh
Halo gan pada kesempatan kali ini saya ingin mencoba membahas mengenai Error yang muncul ketika SSH. Terkadang ketika kita ingin melakukan SSH ke server baik menggunakan Putty (Windows) atau Terminal (Linux), kita menemukan error seperti dibawah ini:
——————————————————-
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:E/dA2wA+cn//pL80prQbHfEVXWyoG9mxW9Z9znaBGr8.
Please contact your system administrator.
Add correct host key in /home/sabto/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/sabto/.ssh/known_hosts:19
remove with:
ssh-keygen -f “/home/sabto/.ssh/known_hosts” -R 192.168.0.48
ECDSA host key for 192.168.0.48 has changed and you have requested strict checking.
Host key verification failed.
——————————————————–
Cause
Hal tersebut biasanya terjadi ketika server kita selesai di Install Ulang. Menurut teori yang beredar, SSH key akan beubah setelah server di install ulang, meskipun OS dan IP nya sama. Karena SSH Key nya berubah, maka SSH key yang ada di komputer kita dengan yang di server tidak cocok.
Resolution
A. Linux Client
Jika anda mengakses SSH nya menggunakan komputer ber-sistem operasi Linux, maka anda tinggal mengcopy-paste command yang muncul di error nya. Berikut adalah langkah-langkah nya:
1. Perhatikan Error Message yang muncul
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:E/dA2wA+cn//pL80prQbHfEVXWyoG9mxW9Z9znaBGr8.
Please contact your system administrator.
Add correct host key in /home/sabto/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/sabto/.ssh/known_hosts:19
remove with:
ssh-keygen -f “/home/sabto/.ssh/known_hosts” -R 192.168.0.48
ECDSA host key for 192.168.0.48 has changed and you have requested strict checking.
Host key verification failed.
2. Pada error tersebut ada kata-kata remove with. Ketikkan perintah yang ada di error tersebut.
$ ssh-keygen -f “/home/sabto/.ssh/known_hosts” -R 192.168.0.48
3. Setelah itu coba kembali melakukan SSH ke servernya.
B. Windows Client
Jika anda mengakses SSH nya menggunakan komputer ber-sistem operasi Windows, maka anda bisa melakukan hal berikut:
1. Perhatikan Error yang muncul ketika kamu melakukan SSH menggunakan Putty
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:E/dA2wA+cn//pL80prQbHfEVXWyoG9mxW9Z9znaBGr8.
Please contact your system administrator.
Add correct host key in /Users/sabto/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/sabto/.ssh/known_hosts:12
RSA host key for 192.168.0.48 has changed and you have requested strict checking.
Host key verification failed.
2. Buka Notepad, Klik Kanan, Run as Administrator
3. Kembali lagi ke error message nya. Pada error tersebut ada kata-kata Offending RSA key. Lalu setelahnya ada path /Users/sabto/.ssh/known_hosts:12. Berarti dari notepad kamu buka file /Users/sabto/.ssh/known_hosts. Jika folder .ssh nya tidak muncul, maka kamu bisa memunculkan file hidden nya dari File Explorer.
4. Lalu setelah terbuka file nya, coba arahkan ke baris nomor 12. Lalu hapus saja seluruh kata-kata yang ada di baris nomor 12.
5. Setelah itu Save Notepad nya lalu coba kembali akses SSH nya menggunakan Putty.
Sekian artikel mengenai SSH Error “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED”. Semoga bermanfaat untuk pembaca. Jangan lupa untuk share artikel supaya bisa bermanfaat untuk orang banyak.
Wassalamualaikum Warrahmatullahi Wabarakatuh
Nice Article..
thanks gan 😊